Issue #17819: Add Maven Central repository.
This commit is contained in:
parent
88facc4608
commit
886850483c
41
build.gradle
41
build.gradle
|
@ -13,6 +13,7 @@ buildscript {
|
|||
includeGroupByRegex RepoMatching.mozilla
|
||||
}
|
||||
}
|
||||
|
||||
maven {
|
||||
name "Mozilla"
|
||||
url "https://maven.mozilla.org/maven2"
|
||||
|
@ -21,6 +22,7 @@ buildscript {
|
|||
includeGroupByRegex RepoMatching.mozilla
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty("googleRepo")) {
|
||||
maven {
|
||||
name "Google"
|
||||
|
@ -38,6 +40,24 @@ buildscript {
|
|||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty("centralRepo")) {
|
||||
maven {
|
||||
name "MavenCentral"
|
||||
url project.property("centralRepo")
|
||||
}
|
||||
} else {
|
||||
mavenCentral() {
|
||||
content {
|
||||
// Improve security: don't search deps with known repos.
|
||||
excludeGroupByRegex RepoMatching.mozilla
|
||||
excludeGroupByRegex RepoMatching.androidx
|
||||
excludeGroupByRegex RepoMatching.comGoogleAndroid
|
||||
excludeGroupByRegex RepoMatching.comGoogleFirebase
|
||||
excludeGroupByRegex RepoMatching.comAndroid
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty("jcenterRepo")) {
|
||||
maven {
|
||||
name "BintrayJCenter"
|
||||
|
@ -86,6 +106,7 @@ allprojects {
|
|||
includeGroupByRegex RepoMatching.mozilla
|
||||
}
|
||||
}
|
||||
|
||||
maven {
|
||||
name "Mozilla"
|
||||
url "https://maven.mozilla.org/maven2"
|
||||
|
@ -94,6 +115,7 @@ allprojects {
|
|||
includeGroupByRegex RepoMatching.mozilla
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty("googleRepo")) {
|
||||
maven {
|
||||
name "Google"
|
||||
|
@ -110,6 +132,25 @@ allprojects {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty("centralRepo")) {
|
||||
maven {
|
||||
name "MavenCentral"
|
||||
url project.property("centralRepo")
|
||||
}
|
||||
} else {
|
||||
mavenCentral() {
|
||||
content {
|
||||
// Improve security: don't search deps with known repos.
|
||||
excludeGroupByRegex RepoMatching.mozilla
|
||||
excludeGroupByRegex RepoMatching.androidx
|
||||
excludeGroupByRegex RepoMatching.comGoogleAndroid
|
||||
excludeGroupByRegex RepoMatching.comGoogleFirebase
|
||||
excludeGroupByRegex RepoMatching.comAndroid
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (project.hasProperty("jcenterRepo")) {
|
||||
maven {
|
||||
name "BintrayJCenter"
|
||||
|
|
|
@ -19,7 +19,7 @@ pushd $PROJECT_DIR
|
|||
. taskcluster/scripts/toolchain/android-gradle-dependencies/before.sh
|
||||
|
||||
NEXUS_PREFIX='http://localhost:8081/nexus/content/repositories'
|
||||
GRADLE_ARGS="--parallel -PgoogleRepo=$NEXUS_PREFIX/google/ -PjcenterRepo=$NEXUS_PREFIX/jcenter/"
|
||||
GRADLE_ARGS="--parallel -PgoogleRepo=$NEXUS_PREFIX/google/ -PjcenterRepo=$NEXUS_PREFIX/jcenter/ -PcentralRepo=$NEXUS_PREFIX/central/"
|
||||
# We build everything to be sure to fetch all dependencies
|
||||
./gradlew $GRADLE_ARGS assemble assembleAndroidTest testClasses ktlint detekt
|
||||
# Some tests may be flaky, although they still download dependencies. So we let the following
|
||||
|
|
|
@ -22,6 +22,7 @@ mkdir -p android-gradle-dependencies /builds/worker/artifacts
|
|||
|
||||
cp -R ${NEXUS_WORK}/storage/jcenter android-gradle-dependencies
|
||||
cp -R ${NEXUS_WORK}/storage/google android-gradle-dependencies
|
||||
cp -R ${NEXUS_WORK}/storage/central android-gradle-dependencies
|
||||
|
||||
tar cf - android-gradle-dependencies | xz > /builds/worker/artifacts/android-gradle-dependencies.tar.xz
|
||||
|
||||
|
|
Loading…
Reference in New Issue