Enhance include groups implementation by decoupling them to a separate file

This commit is contained in:
ariskotsomitopoulos 2021-12-10 19:09:14 +02:00
parent 01cc7b7264
commit c514a3b063
2 changed files with 197 additions and 161 deletions

View File

@ -3,6 +3,7 @@
buildscript { buildscript {
apply from: 'dependencies.gradle' apply from: 'dependencies.gradle'
apply from: 'includegroups.gradle'
repositories { repositories {
google() google()
@ -41,21 +42,13 @@ allprojects {
maven { maven {
url 'https://gitlab.matrix.org/api/v4/projects/27/packages/maven' url 'https://gitlab.matrix.org/api/v4/projects/27/packages/maven'
content { content {
includeGroup 'org.matrix.android' includeGroups.maven["gitlab.matrix.org"].each { includeGroup it }
} }
} }
maven { maven {
url 'https://jitpack.io' url 'https://jitpack.io'
content { content {
includeGroup 'com.github.Armen101' includeGroups.maven["jitpack.io"].each { includeGroup it }
includeGroup 'com.github.BillCarsonFr'
includeGroup 'com.github.chrisbanes'
includeGroup 'com.github.hyuwah'
includeGroup 'com.github.jetradarmobile'
includeGroup 'com.github.tapadoo'
includeGroup 'com.github.vector-im'
includeGroup 'com.github.yalantis'
includeGroup 'com.github.Zhuinden'
} }
} }
// Jitsi repo // Jitsi repo
@ -64,169 +57,24 @@ allprojects {
// Note: to test Jitsi release you can use a local file like this: // Note: to test Jitsi release you can use a local file like this:
// url "file:///Users/bmarty/workspaces/jitsi_libre_maven/android-sdk-3.10.0" // url "file:///Users/bmarty/workspaces/jitsi_libre_maven/android-sdk-3.10.0"
content { content {
includeGroup 'com.facebook.react' includeGroups.maven["github.com/vector-im"].each { includeGroup it }
includeGroup 'org.jitsi.react'
includeGroup 'org.webkit'
} }
} }
google { google {
content { content {
includeGroupByRegex "androidx\\..*" includeGroups.google["all"].each { includeGroup it }
includeGroupByRegex 'com\\.android\\.tools\\..*' includeGroups.google["regex"].each { includeGroupByRegex it }
includeGroupByRegex "com\\.google\\.android\\..*"
includeGroup 'com.google.firebase'
includeGroup 'com.android'
includeGroup 'com.android.tools'
} }
} }
mavenCentral { mavenCentral {
content { content {
includeGroup 'com.adevinta.android' includeGroups.mavenCentral["all"].each { includeGroup it }
includeGroup 'com.airbnb.android'
includeGroup 'com.almworks.sqlite4java'
includeGroup 'com.arthenica'
includeGroup 'com.atlassian.commonmark'
includeGroup 'com.atlassian.pom'
includeGroup 'com.beust'
includeGroup 'com.davemorrissey.labs'
includeGroup 'com.dropbox.core'
includeGroup 'com.facebook.fresco'
includeGroup 'com.facebook.infer.annotation'
includeGroup 'com.facebook.soloader'
includeGroup 'com.facebook.stetho'
includeGroup 'com.fasterxml'
includeGroup 'com.fasterxml.jackson'
includeGroup 'com.fasterxml.jackson.core'
includeGroup 'com.gabrielittner.threetenbp'
includeGroup 'com.getkeepsafe.relinker'
includeGroup 'com.github.bumptech.glide'
includeGroup 'com.github.filippudak'
includeGroup 'com.github.filippudak.progresspieview'
includeGroup 'com.github.javaparser'
includeGroup 'com.github.piasy'
includeGroup 'com.github.shyiko.klob'
includeGroup 'com.google'
includeGroup 'com.google.auto.service'
includeGroup 'com.google.auto.value'
includeGroup 'com.google.code.findbugs'
includeGroup 'com.google.code.gson'
includeGroup 'com.google.dagger'
includeGroup 'com.google.devtools.ksp'
includeGroup 'com.google.errorprone'
includeGroup 'com.google.googlejavaformat'
includeGroup 'com.google.guava'
includeGroup 'com.google.j2objc'
includeGroup 'com.google.jimfs'
includeGroup 'com.google.protobuf'
includeGroup 'com.google.zxing'
includeGroup 'com.googlecode.htmlcompressor'
includeGroup 'com.googlecode.json-simple'
includeGroup 'com.googlecode.libphonenumber'
includeGroup 'com.ibm.icu'
includeGroup 'com.jakewharton.android.repackaged'
includeGroup 'com.jakewharton.timber'
includeGroup 'com.linkedin.dexmaker'
includeGroup 'com.nulab-inc'
includeGroup 'com.otaliastudios.opengl'
includeGroup 'com.parse.bolts'
includeGroup 'com.pinterest'
includeGroup 'com.pinterest.ktlint'
includeGroup 'com.squareup'
includeGroup 'com.squareup.duktape'
includeGroup 'com.squareup.moshi'
includeGroup 'com.squareup.okhttp3'
includeGroup 'com.squareup.okio'
includeGroup 'com.squareup.retrofit2'
includeGroup 'com.sun.activation'
includeGroup 'com.sun.istack'
includeGroup 'com.sun.xml.bind'
includeGroup 'com.sun.xml.bind.mvn'
includeGroup 'com.sun.xml.fastinfoset'
includeGroup 'com.thoughtworks.qdox'
includeGroup 'com.vanniktech'
includeGroup 'commons-cli'
includeGroup 'commons-codec'
includeGroup 'commons-io'
includeGroup 'commons-logging'
includeGroup 'info.picocli'
includeGroup 'io.arrow-kt'
includeGroup 'io.github.detekt.sarif4k'
includeGroup 'io.github.reactivecircus.flowbinding'
includeGroup 'io.jsonwebtoken'
includeGroup 'io.kindedj'
includeGroup 'io.mockk'
includeGroup 'io.noties.markwon'
includeGroup 'io.reactivex.rxjava2'
includeGroup 'io.realm'
includeGroup 'it.unimi.dsi'
includeGroup 'jakarta.activation'
includeGroup 'jakarta.xml.bind'
includeGroup 'javax.annotation'
includeGroup 'javax.inject'
includeGroup 'jline'
includeGroup 'jp.wasabeef'
includeGroup 'junit'
includeGroup 'me.leolin'
includeGroup 'me.saket'
includeGroup 'net.bytebuddy'
includeGroup 'net.java'
includeGroup 'net.java.dev.jna'
includeGroup 'net.lachlanmckee'
includeGroup 'net.ltgt.gradle.incap'
includeGroup 'net.sf.jopt-simple'
includeGroup 'net.sf.kxml'
includeGroup 'nl.dionsegijn'
includeGroup 'org.amshove.kluent'
includeGroup 'org.apache'
includeGroup 'org.apache.ant'
includeGroup 'org.apache.commons'
includeGroup 'org.apache.httpcomponents'
includeGroup 'org.apache.sanselan'
includeGroup 'org.bouncycastle'
includeGroup 'org.checkerframework'
includeGroup 'org.codehaus'
includeGroup 'org.codehaus.groovy'
includeGroup 'org.codehaus.mojo'
includeGroup 'org.eclipse.ee4j'
includeGroup 'org.ec4j.core'
includeGroup 'org.glassfish.jaxb'
includeGroup 'org.hamcrest'
includeGroup 'org.jetbrains'
includeGroup 'org.jetbrains.intellij.deps'
includeGroup 'org.jetbrains.kotlin'
includeGroup 'org.jetbrains.kotlinx'
includeGroup 'org.jsoup'
includeGroup 'org.junit'
includeGroup 'org.junit.jupiter'
includeGroup 'org.junit.platform'
includeGroup 'org.jvnet.staxex'
includeGroup 'org.mockito'
includeGroup 'org.mongodb'
includeGroup 'org.objenesis'
includeGroup 'org.opentest4j'
includeGroup 'org.ow2'
includeGroup 'org.ow2.asm'
includeGroup 'org.ow2.asm'
includeGroup 'org.reactivestreams'
includeGroup 'org.robolectric'
includeGroup 'org.slf4j'
includeGroup 'org.sonatype.oss'
includeGroup 'org.testng'
includeGroup 'org.threeten'
includeGroup 'xerces'
includeGroup 'xml-apis'
} }
} }
//noinspection JcenterRepositoryObsolete
jcenter { jcenter {
content { content {
includeGroup 'com.amulyakhare' includeGroups.jcenter["all"].each { includeGroup it }
includeGroup 'com.otaliastudios'
includeGroup 'com.yqritc'
// https://github.com/cmelchior/realmfieldnameshelper/issues/42
includeGroup 'dk.ilios'
includeGroup 'im.dlg'
includeGroup 'me.dm7.barcodescanner'
includeGroup 'me.gujun.android'
} }
} }
} }

188
includegroups.gradle Normal file
View File

@ -0,0 +1,188 @@
ext.includeGroups = [
maven : [
'jitpack.io' : [
'com.github.Armen101',
'com.github.BillCarsonFr',
'com.github.chrisbanes',
'com.github.hyuwah',
'com.github.jetradarmobile',
'com.github.tapadoo',
'com.github.vector-im',
'com.github.yalantis',
'com.github.Zhuinden'
],
'gitlab.matrix.org' : [
'org.matrix.android'
],
'github.com/vector-im': [
'com.facebook.react',
'org.jitsi.react',
'org.webkit'
]
],
google : [
'all' : [
'com.google.firebase',
'com.android',
'com.android.tools'
],
'regex': [
'androidx\\..*',
'com\\.android\\.tools\\..*',
'com\\.google\\.android\\..*'
]
],
mavenCentral: [
'all': [
'com.adevinta.android',
'com.airbnb.android',
'com.almworks.sqlite4java',
'com.arthenica',
'com.atlassian.commonmark',
'com.atlassian.pom',
'com.beust',
'com.davemorrissey.labs',
'com.dropbox.core',
'com.facebook.fresco',
'com.facebook.infer.annotation',
'com.facebook.soloader',
'com.facebook.stetho',
'com.fasterxml',
'com.fasterxml.jackson',
'com.fasterxml.jackson.core',
'com.gabrielittner.threetenbp',
'com.getkeepsafe.relinker',
'com.github.bumptech.glide',
'com.github.filippudak',
'com.github.filippudak.progresspieview',
'com.github.javaparser',
'com.github.piasy',
'com.github.shyiko.klob',
'com.google',
'com.google.auto.service',
'com.google.auto.value',
'com.google.code.findbugs',
'com.google.code.gson',
'com.google.dagger',
'com.google.devtools.ksp',
'com.google.errorprone',
'com.google.googlejavaformat',
'com.google.guava',
'com.google.j2objc',
'com.google.jimfs',
'com.google.protobuf',
'com.google.zxing',
'com.googlecode.htmlcompressor',
'com.googlecode.json-simple',
'com.googlecode.libphonenumber',
'com.ibm.icu',
'com.jakewharton.android.repackaged',
'com.jakewharton.timber',
'com.linkedin.dexmaker',
'com.nulab-inc',
'com.otaliastudios.opengl',
'com.parse.bolts',
'com.pinterest',
'com.pinterest.ktlint',
'com.squareup',
'com.squareup.duktape',
'com.squareup.moshi',
'com.squareup.okhttp3',
'com.squareup.okio',
'com.squareup.retrofit2',
'com.sun.activation',
'com.sun.istack',
'com.sun.xml.bind',
'com.sun.xml.bind.mvn',
'com.sun.xml.fastinfoset',
'com.thoughtworks.qdox',
'com.vanniktech',
'commons-cli',
'commons-codec',
'commons-io',
'commons-logging',
'info.picocli',
'io.arrow-kt',
'io.github.detekt.sarif4k',
'io.github.reactivecircus.flowbinding',
'io.jsonwebtoken',
'io.kindedj',
'io.mockk',
'io.noties.markwon',
'io.reactivex.rxjava2',
'io.realm',
'it.unimi.dsi',
'jakarta.activation',
'jakarta.xml.bind',
'javax.annotation',
'javax.inject',
'jline',
'jp.wasabeef',
'junit',
'me.leolin',
'me.saket',
'net.bytebuddy',
'net.java',
'net.java.dev.jna',
'net.lachlanmckee',
'net.ltgt.gradle.incap',
'net.sf.jopt-simple',
'net.sf.kxml',
'nl.dionsegijn',
'org.amshove.kluent',
'org.apache',
'org.apache.ant',
'org.apache.commons',
'org.apache.httpcomponents',
'org.apache.sanselan',
'org.bouncycastle',
'org.checkerframework',
'org.codehaus',
'org.codehaus.groovy',
'org.codehaus.mojo',
'org.eclipse.ee4j',
'org.ec4j.core',
'org.glassfish.jaxb',
'org.hamcrest',
'org.jetbrains',
'org.jetbrains.intellij.deps',
'org.jetbrains.kotlin',
'org.jetbrains.kotlinx',
'org.jsoup',
'org.junit',
'org.junit.jupiter',
'org.junit.platform',
'org.jvnet.staxex',
'org.mockito',
'org.mongodb',
'org.objenesis',
'org.opentest4j',
'org.ow2',
'org.ow2.asm',
'org.ow2.asm',
'org.reactivestreams',
'org.robolectric',
'org.slf4j',
'org.sonatype.oss',
'org.testng',
'org.threeten',
'xerces',
'xml-apis'
]
],
jcenter : [
'all': [
'com.amulyakhare',
'com.otaliastudios',
'com.yqritc',
// https://github.com/cmelchior/realmfieldnameshelper/issues/42
'dk.ilios',
'im.dlg',
'me.dm7.barcodescanner',
'me.gujun.android'
]
]
]