From a71f2415a633b17e312a810d099f696affcaa573 Mon Sep 17 00:00:00 2001 From: Benoit Marty Date: Fri, 10 Dec 2021 21:35:48 +0100 Subject: [PATCH] Common struct for each maven repo --- build.gradle | 19 +++++++++----- dependencies_groups.gradle | 54 +++++++++++++++++++++++--------------- 2 files changed, 45 insertions(+), 28 deletions(-) diff --git a/build.gradle b/build.gradle index 9c1c0b41c7..27cf94bef9 100644 --- a/build.gradle +++ b/build.gradle @@ -41,13 +41,15 @@ allprojects { maven { url 'https://gitlab.matrix.org/api/v4/projects/27/packages/maven' content { - includeGroups.maven["gitlab.matrix.org"].each { includeGroup it } + groups.olm.regex.each { includeGroupByRegex it } + groups.olm.group.each { includeGroup it } } } maven { url 'https://jitpack.io' content { - includeGroups.maven["jitpack.io"].each { includeGroup it } + groups.jitpack.regex.each { includeGroupByRegex it } + groups.jitpack.group.each { includeGroup it } } } // Jitsi repo @@ -56,24 +58,27 @@ allprojects { // 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" content { - includeGroups.maven["github.com/vector-im"].each { includeGroup it } + groups.jitsi.regex.each { includeGroupByRegex it } + groups.jitsi.group.each { includeGroup it } } } google { content { - includeGroups.google["all"].each { includeGroup it } - includeGroups.google["regex"].each { includeGroupByRegex it } + groups.google.regex.each { includeGroupByRegex it } + groups.google.group.each { includeGroup it } } } mavenCentral { content { - includeGroups.mavenCentral["all"].each { includeGroup it } + groups.mavenCentral.regex.each { includeGroupByRegex it } + groups.mavenCentral.group.each { includeGroup it } } } //noinspection JcenterRepositoryObsolete jcenter { content { - includeGroups.jcenter["all"].each { includeGroup it } + groups.jcenter.regex.each { includeGroupByRegex it } + groups.jcenter.group.each { includeGroup it } } } } diff --git a/dependencies_groups.gradle b/dependencies_groups.gradle index 4707bf67c5..c677290adc 100644 --- a/dependencies_groups.gradle +++ b/dependencies_groups.gradle @@ -1,6 +1,8 @@ -ext.includeGroups = [ - maven : [ - 'jitpack.io' : [ +ext.groups = [ + jitpack : [ + regex: [ + ], + group: [ 'com.github.Armen101', 'com.github.BillCarsonFr', 'com.github.chrisbanes', @@ -9,32 +11,41 @@ ext.includeGroups = [ 'com.github.tapadoo', 'com.github.vector-im', 'com.github.yalantis', - 'com.github.Zhuinden' + 'com.github.Zhuinden', + ] + ], + olm : [ + regex: [ ], - 'gitlab.matrix.org' : [ - 'org.matrix.android' + group: [ + 'org.matrix.android', + ] + ], + jitsi : [ + regex: [ ], - 'github.com/vector-im': [ + group: [ 'com.facebook.react', 'org.jitsi.react', - 'org.webkit' + 'org.webkit', ] - ], google : [ - 'all' : [ - 'com.google.firebase', - 'com.android', - 'com.android.tools' - ], - 'regex': [ + regex: [ 'androidx\\..*', 'com\\.android\\.tools\\..*', - 'com\\.google\\.android\\..*' + 'com\\.google\\.android\\..*', + ], + group: [ + 'com.google.firebase', + 'com.android', + 'com.android.tools', ] ], mavenCentral: [ - 'all': [ + regex: [ + ], + group: [ 'com.adevinta.android', 'com.airbnb.android', 'com.almworks.sqlite4java', @@ -168,11 +179,13 @@ ext.includeGroups = [ 'org.testng', 'org.threeten', 'xerces', - 'xml-apis' + 'xml-apis', ] ], jcenter : [ - 'all': [ + regex: [ + ], + group: [ 'com.amulyakhare', 'com.otaliastudios', 'com.yqritc', @@ -180,9 +193,8 @@ ext.includeGroups = [ 'dk.ilios', 'im.dlg', 'me.dm7.barcodescanner', - 'me.gujun.android' + 'me.gujun.android', ] - ] ]