Bug 1384695 - Fetch Android Gradle dependencies from jcenter and maven.google.com. r=sebastian
authorNick Alexander <nalexander@mozilla.com>
Wed, 26 Jul 2017 12:03:45 -0700
changeset 422874 e5ff31e79fc3cd95ce7e45853e250d012103b51d
parent 422873 825f66025aa04ed0c041e76d1d97f6b4e887dd84
child 422875 71287bfefb0380c99e6ac5951bf8362cc0499a0f
push id1517
push userjlorenzo@mozilla.com
push dateThu, 14 Sep 2017 16:50:54 +0000
treeherdermozilla-release@3b41fd564418 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1384695
milestone56.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1384695 - Fetch Android Gradle dependencies from jcenter and maven.google.com. r=sebastian I took the time to change jcentral (which is just wrong) to jcenter, which is the tag used in the nexus.xml. Order matters! Gradle resolves dependencies in the order given. That is, jcenter is preferred to google. MozReview-Commit-ID: CcWBukhiHa4
mobile/android/config/mozconfigs/android-api-15-gradle-dependencies/nightly
taskcluster/docker/android-gradle-build/bin/after.sh
taskcluster/docker/android-gradle-build/nexus.xml
--- a/mobile/android/config/mozconfigs/android-api-15-gradle-dependencies/nightly
+++ b/mobile/android/config/mozconfigs/android-api-15-gradle-dependencies/nightly
@@ -11,17 +11,17 @@ MOZ_AUTOMATION_UPLOAD_SYMBOLS=0
 NO_CACHE=1
 NO_NDK=1
 
 . "$topsrcdir/mobile/android/config/mozconfigs/common"
 
 # We want to download Gradle.
 ac_add_options --with-gradle
 # We want to use (and populate!) the local Nexus repositories.
-export GRADLE_MAVEN_REPOSITORIES="http://localhost:8081/nexus/content/repositories/jcenter/"
+export GRADLE_MAVEN_REPOSITORIES="http://localhost:8081/nexus/content/repositories/jcenter/","http://localhost:8081/nexus/content/repositories/google/"
 
 # From here on, just like ../android-api-15-frontend/nightly.
 
 ac_add_options --disable-compile-environment
 unset HOST_CC
 unset HOST_CXX
 unset RUSTC
 unset CARGO
--- a/taskcluster/docker/android-gradle-build/bin/after.sh
+++ b/taskcluster/docker/android-gradle-build/bin/after.sh
@@ -19,36 +19,41 @@ mv android-sdk-linux.tar.xz /home/worker
 
 cp -R /home/worker/workspace/build/src/java_home java_home
 tar cJf java_home.tar.xz java_home
 
 # We can't redistribute Java publicly.
 mkdir -p /home/worker/private/java_home
 mv java_home.tar.xz /home/worker/private/java_home
 
-cp -R /workspace/nexus/storage/jcenter jcentral
-tar cJf jcentral.tar.xz jcentral
+cp -R /workspace/nexus/storage/jcenter jcenter
+tar cJf jcenter.tar.xz jcenter
+
+cp -R /workspace/nexus/storage/google google
+tar cJf google.tar.xz google
 
 # The Gradle wrapper will have downloaded and verified the hash of exactly one
 # Gradle distribution.  It will be located in $GRADLE_USER_HOME, like
 # ~/.gradle/wrapper/dists/gradle-2.7-all/$PROJECT_HASH/gradle-2.7-all.zip.  We
 # want to remove the version from the internal directory for use via tooltool in
 # a mozconfig.
 cp $GRADLE_USER_HOME/wrapper/dists/gradle-${GRADLE_VERSION}-all/*/gradle-${GRADLE_VERSION}-all.zip gradle-${GRADLE_VERSION}-all.zip
 unzip -q gradle-${GRADLE_VERSION}-all.zip
 mv gradle-${GRADLE_VERSION} gradle-dist
 tar cJf gradle-dist.tar.xz gradle-dist
 
 mkdir -p /home/worker/artifacts
-mv jcentral.tar.xz /home/worker/artifacts
+mv jcenter.tar.xz /home/worker/artifacts
+mv google.tar.xz /home/worker/artifacts
 mv gradle-dist.tar.xz /home/worker/artifacts
 popd
 
 # Bug 1245170: at some point in the future, we'll be able to upload
 # things directly to tooltool.
 # pushd /home/worker/artifacts
-# /build/tooltool.py add --visibility=public jcentral.tar.xz
+# /build/tooltool.py add --visibility=public jcenter.tar.xz
+# /build/tooltool.py add --visibility=public google.tar.xz
 # /build/tooltool.py add --visibility=public gradle-dist.tar.xz
 # /build/tooltool.py add --visibility=internal android-sdk-linux.tar.xz
 # /build/tooltool.py add --visibility=internal java_home.tar.xz
 # /build/tooltool.py upload -v --url=http://relengapi/tooltool/ \
-#   --message="No message - Gradle and jcentral archives uploaded from taskcluster."
+#   --message="No message - Archives uploaded from taskcluster."
 # popd
--- a/taskcluster/docker/android-gradle-build/nexus.xml
+++ b/taskcluster/docker/android-gradle-build/nexus.xml
@@ -46,16 +46,47 @@
         <downloadRemoteIndex>false</downloadRemoteIndex>
         <artifactMaxAge>-1</artifactMaxAge>
         <metadataMaxAge>1440</metadataMaxAge>
         <itemMaxAge>1440</itemMaxAge>
         <autoBlockActive>true</autoBlockActive>
       </externalConfiguration>
     </repository>
     <repository>
+      <id>google</id>
+      <name>google</name>
+      <providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole>
+      <providerHint>maven2</providerHint>
+      <localStatus>IN_SERVICE</localStatus>
+      <notFoundCacheActive>true</notFoundCacheActive>
+      <notFoundCacheTTL>1440</notFoundCacheTTL>
+      <userManaged>true</userManaged>
+      <exposed>true</exposed>
+      <browseable>true</browseable>
+      <writePolicy>READ_ONLY</writePolicy>
+      <indexable>true</indexable>
+      <searchable>true</searchable>
+      <localStorage>
+        <provider>file</provider>
+      </localStorage>
+      <remoteStorage>
+        <url>https://maven.google.com/</url>
+      </remoteStorage>
+      <externalConfiguration>
+        <repositoryPolicy>RELEASE</repositoryPolicy>
+        <checksumPolicy>STRICT</checksumPolicy>
+        <fileTypeValidation>true</fileTypeValidation>
+        <downloadRemoteIndex>false</downloadRemoteIndex>
+        <artifactMaxAge>-1</artifactMaxAge>
+        <metadataMaxAge>1440</metadataMaxAge>
+        <itemMaxAge>1440</itemMaxAge>
+        <autoBlockActive>true</autoBlockActive>
+      </externalConfiguration>
+    </repository>
+    <repository>
       <id>central</id>
       <name>Central</name>
       <providerRole>org.sonatype.nexus.proxy.repository.Repository</providerRole>
       <providerHint>maven2</providerHint>
       <localStatus>IN_SERVICE</localStatus>
       <notFoundCacheActive>true</notFoundCacheActive>
       <notFoundCacheTTL>1440</notFoundCacheTTL>
       <userManaged>true</userManaged>