Bug 1476165 - Update Android Gradle plugin to version 3.1.0. r=nalexander draft
authorTudor-Gabriel Vîjială <tvijiala@mozilla.com>
Tue, 17 Jul 2018 13:20:19 +0100
changeset 821171 4668e44d9134e10f48ac51d81777ec7f13271de5
parent 821164 9daa53881b7ae80bf6b093dac5d7744cf7fd18b1
push id117027
push userbmo:tvijiala@mozilla.com
push dateSat, 21 Jul 2018 16:38:57 +0000
reviewersnalexander
bugs1476165
milestone63.0a1
Bug 1476165 - Update Android Gradle plugin to version 3.1.0. r=nalexander MozReview-Commit-ID: LR1OWncvuwt
build.gradle
gradle/wrapper/gradle-wrapper.properties
mobile/android/geckoview/build.gradle
old-configure.in
python/mozboot/mozboot/android-packages.txt
taskcluster/scripts/misc/android-gradle-dependencies/after.sh
--- a/build.gradle
+++ b/build.gradle
@@ -53,17 +53,17 @@ buildscript {
     ext.kotlin_version = '1.2.41'
     ext.support_library_version = '26.1.0'
 
     if (gradle.mozconfig.substs.MOZ_ANDROID_GOOGLE_PLAY_SERVICES) {
         ext.google_play_services_version = '15.0.1'
     }
 
     dependencies {
-        classpath 'com.android.tools.build:gradle:3.0.1'
+        classpath 'com.android.tools.build:gradle:3.1.0'
         classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
     }
 }
 
 if ('multi' == System.env.AB_CD) {
     // Multi-l10n builds set `AB_CD=multi`, which isn't a valid locale.  This
     // causes the
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,7 +1,7 @@
 #Fri Sep 16 15:41:50 PDT 2016
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip
-distributionSha256Sum=5c07b3bac2209fbc98fb1fdf6fd831f72429cdf8c503807404eae03d8c8099e5
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
+distributionSha256Sum=7a2c66d1a78f811d5f37d14630ad21cec5e77a2a4dc61e787e2257a6341016ce
--- a/mobile/android/geckoview/build.gradle
+++ b/mobile/android/geckoview/build.gradle
@@ -219,17 +219,19 @@ android.libraryVariants.all { variant ->
     // https://github.com/mapbox/mapbox-gl-native/blob/d169ea55c1cfa85cd8bf19f94c5f023569f71810/platform/android/MapboxGLAndroidSDK/build.gradle#L85
     // informed by
     // https://code.tutsplus.com/tutorials/creating-and-publishing-an-android-library--cms-24582,
     // and amended from numerous Stackoverflow posts.
     def name = variant.name
     def javadoc = task "javadoc${name.capitalize()}"(type: Javadoc) {
         description = "Generate Javadoc for build variant $name"
         destinationDir = new File(destinationDir, variant.baseName)
-        classpath = files(variant.javaCompile.classpath.files)
+        doFirst {
+            classpath = files(variant.javaCompile.classpath.files)
+        }
 
         source = files(variant.javaCompile.source)
         exclude '**/R.java', '**/BuildConfig.java'
         include 'org/mozilla/geckoview/**'
         options.addPathOption('sourcepath', ':').setValue(
             variant.sourceSets.collect({ it.javaDirectories }).flatten() +
             variant.generateBuildConfig.sourceOutputDir +
             variant.aidlCompile.sourceOutputDir)
--- a/old-configure.in
+++ b/old-configure.in
@@ -2052,17 +2052,17 @@ AC_SUBST(MOZ_MULET)
 
 dnl ========================================================
 dnl Ensure Android SDK and build-tools versions depending on
 dnl mobile target.
 dnl ========================================================
 
 case "$MOZ_BUILD_APP" in
 mobile/android)
-    MOZ_ANDROID_SDK(26, 26, 26.0.2)
+    MOZ_ANDROID_SDK(26, 26, 27.0.3)
     ;;
 esac
 
 dnl ========================================================
 dnl =
 dnl = Toolkit Options
 dnl =
 dnl ========================================================
--- a/python/mozboot/mozboot/android-packages.txt
+++ b/python/mozboot/mozboot/android-packages.txt
@@ -1,6 +1,6 @@
 platform-tools
-build-tools;26.0.2
+build-tools;27.0.3
 platforms;android-26
 extras;android;m2repository
 extras;google;m2repository
 emulator
--- a/taskcluster/scripts/misc/android-gradle-dependencies/after.sh
+++ b/taskcluster/scripts/misc/android-gradle-dependencies/after.sh
@@ -1,16 +1,16 @@
 #!/bin/bash -vex
 
 set -x -e
 
 echo "running as" $(id)
 
 : WORKSPACE ${WORKSPACE:=/builds/worker/workspace}
-: GRADLE_VERSION ${GRADLE_VERSION:=4.1}
+: GRADLE_VERSION ${GRADLE_VERSION:=4.4}
 
 set -v
 
 # Package everything up.
 pushd $WORKSPACE
 mkdir -p android-gradle-dependencies /builds/worker/artifacts
 
 cp -R ${NEXUS_WORK}/storage/jcenter android-gradle-dependencies