Bug 1506267 - Add plugins.gradle.com to Nexus. r=nalexander.
authorAgi Sferro <agi@mozilla.com>
Mon, 19 Nov 2018 16:03:33 +0000
changeset 506218 c08a99b4dd84516a9163f256e52e25cc9b8a273b
parent 506217 6b61884fd13dc5ad46cf05461e7145f3e0337e43
child 506219 04afa20040846c14349b9015cd0089ec0b0aad85
push id1905
push userffxbld-merge
push dateMon, 21 Jan 2019 12:33:13 +0000
treeherdermozilla-release@c2fca1944d8c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1506267
milestone65.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 1506267 - Add plugins.gradle.com to Nexus. r=nalexander. Differential Revision: https://phabricator.services.mozilla.com/D12047
build.gradle
mobile/android/config/mozconfigs/android-api-16-gradle-dependencies/nightly
mobile/android/config/mozconfigs/common
mobile/android/gradle.configure
mobile/android/gradle/m2repo/README
taskcluster/scripts/misc/android-gradle-dependencies/after.sh
taskcluster/scripts/misc/android-gradle-dependencies/nexus.xml
--- a/build.gradle
+++ b/build.gradle
@@ -39,20 +39,16 @@ buildDir "${topobjdir}/gradle/build"
 
 buildscript {
     repositories {
         gradle.mozconfig.substs.GRADLE_MAVEN_REPOSITORIES.each { repository ->
             maven {
                 url repository
             }
         }
-        // For in tree plugins.
-        maven {
-            url "file://${gradle.mozconfig.topsrcdir}/mobile/android/gradle/m2repo"
-        }
     }
 
     ext.kotlin_version = '1.2.41'
     ext.support_library_version = '26.1.0'
     ext.jacoco_version = '0.8.1'
 
     if (gradle.mozconfig.substs.MOZ_ANDROID_GOOGLE_PLAY_SERVICES) {
         ext.google_play_services_version = '15.0.1'
--- a/mobile/android/config/mozconfigs/android-api-16-gradle-dependencies/nightly
+++ b/mobile/android/config/mozconfigs/android-api-16-gradle-dependencies/nightly
@@ -9,17 +9,17 @@ MOZ_AUTOMATION_PACKAGE_GENERATED_SOURCES
 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/google/","http://localhost:8081/nexus/content/repositories/jcenter/"
+export GRADLE_MAVEN_REPOSITORIES="http://localhost:8081/nexus/content/repositories/google/","http://localhost:8081/nexus/content/repositories/jcenter/","http://localhost:8081/nexus/content/repositories/gradle-plugins/"
 
 # From here on, just like ../android-api-16-frontend/nightly.
 
 . "$topsrcdir/build/mozconfig.no-compile"
 
 ac_add_options --disable-tests
 
 # Android
--- a/mobile/android/config/mozconfigs/common
+++ b/mobile/android/config/mozconfigs/common
@@ -16,17 +16,17 @@ MOZ_AUTOMATION_L10N_CHECK=0
 HOST_CC="$topsrcdir/clang/bin/clang"
 HOST_CXX="$topsrcdir/clang/bin/clang++"
 
 # Build Fennec
 ac_add_options --enable-application=mobile/android
 ac_add_options --with-android-sdk="$topsrcdir/android-sdk-linux"
 
 ac_add_options --with-gradle="$topsrcdir/android-gradle-dependencies/gradle-dist/bin/gradle"
-export GRADLE_MAVEN_REPOSITORIES="file://$topsrcdir/android-gradle-dependencies/google","file://$topsrcdir/android-gradle-dependencies/jcenter"
+export GRADLE_MAVEN_REPOSITORIES="file://$topsrcdir/android-gradle-dependencies/google","file://$topsrcdir/android-gradle-dependencies/jcenter","file://$topsrcdir/android-gradle-dependencies/gradle-plugins"
 
 if [ -z "$NO_NDK" ]; then
     # We use our own clang instead of the NDK's clang.
     CC="$topsrcdir/clang/bin/clang"
     CXX="$topsrcdir/clang/bin/clang++"
     ac_add_options --with-android-ndk="$topsrcdir/android-ndk"
 fi
 
--- a/mobile/android/gradle.configure
+++ b/mobile/android/gradle.configure
@@ -312,16 +312,17 @@ def gradle_flags(value):
 set_config('GRADLE_FLAGS', gradle_flags)
 
 # Automation will set this to (file:///path/to/local, ...) via the mozconfig.
 # Local developer default is (jcenter, maven.google.com).
 option(env='GRADLE_MAVEN_REPOSITORIES',
        nargs='+',
        default=('https://maven.google.com/',
                 'https://jcenter.bintray.com/',
+                'https://plugins.gradle.org/m2/',
        ),
        help='Comma-separated URLs of Maven repositories containing Gradle dependencies.')
 
 @depends('GRADLE_MAVEN_REPOSITORIES')
 @imports(_from='os.path', _import='isdir')
 def gradle_maven_repositories(values):
     if not values:
         die('GRADLE_MAVEN_REPOSITORIES must not be empty')
deleted file mode 100644
--- a/mobile/android/gradle/m2repo/README
+++ /dev/null
@@ -1,1 +0,0 @@
-In tree Gradle packages and plugins go here.
\ No newline at end of file
--- a/taskcluster/scripts/misc/android-gradle-dependencies/after.sh
+++ b/taskcluster/scripts/misc/android-gradle-dependencies/after.sh
@@ -10,16 +10,17 @@ echo "running as" $(id)
 set -v
 
 # Package everything up.
 pushd $WORKSPACE
 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/gradle-plugins android-gradle-dependencies
 
 # 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
--- a/taskcluster/scripts/misc/android-gradle-dependencies/nexus.xml
+++ b/taskcluster/scripts/misc/android-gradle-dependencies/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>gradle-plugins</id>
+      <name>Gradle Plugins</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://plugins.gradle.org/m2/</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>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>