Bug 1501351 - Gradle fails to download some artifacts even though bintray advertises it has them. r=nalexander
authorAndi-Bogdan Postelnicu <bpostelnicu@mozilla.com>
Tue, 23 Oct 2018 17:27:54 +0000
changeset 490990 52e7a7889da0f493c65fa0aa2fcea6a0e1f6a06b
parent 490989 135b9518b925cfbd47e251a044c38d4304edf12b
child 490991 23205c4744f095d4f4c87a6f6238c98f87ae3ae5
push id247
push userfmarier@mozilla.com
push dateSat, 27 Oct 2018 01:06:44 +0000
reviewersnalexander
bugs1501351
milestone65.0a1
Bug 1501351 - Gradle fails to download some artifacts even though bintray advertises it has them. r=nalexander Differential Revision: https://phabricator.services.mozilla.com/D9553
mobile/android/config/mozconfigs/android-api-16-gradle-dependencies/nightly
mobile/android/config/mozconfigs/common
mobile/android/gradle.configure
--- 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/jcenter/","http://localhost:8081/nexus/content/repositories/google/"
+export GRADLE_MAVEN_REPOSITORIES="http://localhost:8081/nexus/content/repositories/google/","http://localhost:8081/nexus/content/repositories/jcenter/"
 
 # 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/jcenter","file://$topsrcdir/android-gradle-dependencies/google"
+export GRADLE_MAVEN_REPOSITORIES="file://$topsrcdir/android-gradle-dependencies/google","file://$topsrcdir/android-gradle-dependencies/jcenter"
 
 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
@@ -289,18 +289,18 @@ def gradle_flags(value):
     return value[0] if value else ''
 
 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://jcenter.bintray.com/',
-                'https://maven.google.com/',
+       default=('https://maven.google.com/',
+                'https://jcenter.bintray.com/',
        ),
        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')