Bug 1447734 - Specify Google Play Services library version in Gradle r=nalexander
authorJames Willcox <snorp@snorp.net>
Wed, 21 Mar 2018 12:50:11 -0500
changeset 409605 7e634d3b77f97e43b5f5e85db7f069438de37abf
parent 409604 e43e49725fef9f0617655427ec07cf982ff3f778
child 409606 736c81fc596c4e171e211f880c95dfd958396435
push id33693
push usernbeleuzu@mozilla.com
push dateFri, 23 Mar 2018 09:52:16 +0000
treeherdermozilla-central@9cb650de48f9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnalexander
bugs1447734
milestone61.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 1447734 - Specify Google Play Services library version in Gradle r=nalexander MozReview-Commit-ID: KXcYJTlG2UC
build.gradle
mobile/android/app/build.gradle
mobile/android/moz.configure
mobile/android/thirdparty/build.gradle
--- a/build.gradle
+++ b/build.gradle
@@ -48,16 +48,20 @@ buildscript {
         maven {
             url "file://${gradle.mozconfig.topsrcdir}/mobile/android/gradle/m2repo"
         }
     }
 
     ext.kotlin_version = '1.1.51'
     ext.support_library_version = '23.4.0'
 
+    if (gradle.mozconfig.substs.MOZ_ANDROID_GOOGLE_PLAY_SERVICES) {
+        ext.google_play_services_version = '8.4.0'
+    }
+
     dependencies {
         classpath 'com.android.tools.build:gradle:3.0.1'
         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) {
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -218,31 +218,31 @@ dependencies {
     implementation "com.android.support:cardview-v7:$support_library_version"
     implementation "com.android.support:recyclerview-v7:$support_library_version"
     implementation "com.android.support:design:$support_library_version"
     implementation "com.android.support:customtabs:$support_library_version"
     implementation "com.android.support:palette-v7:$support_library_version"
 
     if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
         implementation "com.android.support:mediarouter-v7:$support_library_version"
-        implementation "com.google.android.gms:play-services-basement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
-        implementation "com.google.android.gms:play-services-base:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
-        implementation "com.google.android.gms:play-services-cast:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
+        implementation "com.google.android.gms:play-services-basement:$google_play_services_version"
+        implementation "com.google.android.gms:play-services-base:$google_play_services_version"
+        implementation "com.google.android.gms:play-services-cast:$google_play_services_version"
     }
 
     if (mozconfig.substs.MOZ_INSTALL_TRACKING) {
-        implementation "com.google.android.gms:play-services-analytics:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
-        implementation "com.google.android.gms:play-services-basement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
+        implementation "com.google.android.gms:play-services-analytics:$google_play_services_version"
+        implementation "com.google.android.gms:play-services-basement:$google_play_services_version"
     }
 
     if (mozconfig.substs.MOZ_ANDROID_GCM) {
-        implementation "com.google.android.gms:play-services-basement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
-        implementation "com.google.android.gms:play-services-base:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
-        implementation "com.google.android.gms:play-services-gcm:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
-        implementation "com.google.android.gms:play-services-measurement:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
+        implementation "com.google.android.gms:play-services-basement:$google_play_services_version"
+        implementation "com.google.android.gms:play-services-base:$google_play_services_version"
+        implementation "com.google.android.gms:play-services-gcm:$google_play_services_version"
+        implementation "com.google.android.gms:play-services-measurement:$google_play_services_version"
     }
 
     // Include LeakCanary in local builds, but not in official builds.  Mach
     // builds target the official audience, so LeakCanary will not be included
     // in any Mach build.
     localImplementation 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
     officialImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
     testImplementation 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
--- a/mobile/android/moz.configure
+++ b/mobile/android/moz.configure
@@ -13,19 +13,16 @@ option('--with-google-play-services',
        default=True)
 
 @depends('--with-google-play-services')
 def google_play_services(value):
     return bool(value)
 
 set_config('MOZ_ANDROID_GOOGLE_PLAY_SERVICES', depends_if(google_play_services)(lambda _: True))
 
-set_config('ANDROID_GOOGLE_PLAY_SERVICES_VERSION', '8.4.0')
-add_old_configure_assignment('ANDROID_GOOGLE_PLAY_SERVICES_VERSION', '8.4.0')
-
 option(env='MOZ_ANDROID_GCM',
        help='Enable GCM (Google Cloud Messaging) registration',
        default=google_play_services)
 
 set_config('MOZ_ANDROID_GCM',
            depends_if('MOZ_ANDROID_GCM')(lambda _: True))
 add_old_configure_assignment('MOZ_ANDROID_GCM',
                              depends_if('MOZ_ANDROID_GCM')(lambda _: True))
--- a/mobile/android/thirdparty/build.gradle
+++ b/mobile/android/thirdparty/build.gradle
@@ -42,17 +42,17 @@ android {
     }
 }
 
 dependencies {
     implementation "com.android.support:support-v4:$support_library_version"
     if (mozconfig.substs.MOZ_ANDROID_MMA) {
         implementation "com.android.support:appcompat-v7:$support_library_version"
         implementation "com.android.support:support-annotations:$support_library_version"
-        implementation "com.google.android.gms:play-services-gcm:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
+        implementation "com.google.android.gms:play-services-gcm:$google_play_services_version"
     }
 }
 
 apply plugin: 'idea'
 
 idea {
     module {
         // This is cosmetic.  See the excludes in the root project.