Bug 1447734 - Specify Google Play Services library version in Gradle r=nalexander
MozReview-Commit-ID: KXcYJTlG2UC
--- a/build.gradle
+++ b/build.gradle
@@ -47,16 +47,17 @@ buildscript {
// For in tree plugins.
maven {
url "file://${gradle.mozconfig.topsrcdir}/mobile/android/gradle/m2repo"
}
}
ext.kotlin_version = '1.1.51'
ext.support_library_version = '23.4.0'
+ 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"
}
}
--- 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.