Bug 1524529 - Update Play Services Cast to 16.0.0. r=VladBaicu, a=RyanVM
authorAndrei Lazar <andrei.a.lazar@softvision.ro>
Mon, 04 Feb 2019 12:44:13 +0000
changeset 512930 8232af0a1a56ba84557fe22e6618c305728705fb
parent 512929 4e7796daf83876341131ecde49e8d38d4989d4c0
child 512931 c9ddc3681d30e84726066439fc73fc4c6363d6f8
push id10644
push userryanvm@gmail.com
push dateThu, 07 Feb 2019 15:29:46 +0000
treeherdermozilla-beta@8232af0a1a56 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersVladBaicu, RyanVM
bugs1524529
milestone66.0
Bug 1524529 - Update Play Services Cast to 16.0.0. r=VladBaicu, a=RyanVM Updated play-services-cast to 16.0.0 in order to benefit from the IPv6 and other features. Differential Revision: https://phabricator.services.mozilla.com/D18324
build.gradle
mobile/android/app/build.gradle
--- a/build.gradle
+++ b/build.gradle
@@ -79,16 +79,17 @@ buildscript {
     }
 
     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'
+        ext.google_play_services_cast_version = '16.0.0'
     }
 
     dependencies {
         classpath 'org.mozilla.apilint:apilint:0.1.7'
         classpath 'com.android.tools.build:gradle:3.1.4'
         classpath 'com.getkeepsafe.dexcount:dexcount-gradle-plugin:0.8.2'
         classpath 'org.apache.commons:commons-exec:1.3'
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -219,17 +219,17 @@ dependencies {
     // We could conditionally include support, but we'd need
     // to generate the `Application` class or fork the file on disk.
     implementation "com.android.support:multidex:1.0.3"
 
     if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
         implementation "com.android.support:mediarouter-v7:$support_library_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"
+        implementation "com.google.android.gms:play-services-cast:$google_play_services_cast_version"
     }
 
     if (mozconfig.substs.MOZ_INSTALL_TRACKING) {
         implementation "com.google.android.gms:play-services-ads-identifier:$google_play_services_version"
         implementation "com.google.android.gms:play-services-basement:$google_play_services_version"
     }
 
     if (mozconfig.substs.MOZ_ANDROID_GCM) {
@@ -452,23 +452,25 @@ android.applicationVariants.all configur
 
 // Bug 1320310 - Hack up the manifest produced by Gradle to match that produced
 // by moz.build.  Per https://bugzilla.mozilla.org/show_bug.cgi?id=1320310#c14,
 // this breaks launching in Android Studio; therefore, we only do this for
 // official automation builds and not for local developer builds.
 import groovy.xml.XmlUtil
 
 // Workaround for fixing sub-dependencies upon gradle error:
-// All gms/firebase libraries must use the exact same version specification (mixing versions can
+// All gms/firebase (except play-services-cast since it has sub-dependencies in 15.0.0)
+// libraries must use the exact same version specification (mixing versions can
 // lead to runtime crashes). Found versions 15.0.1, 15.0.0. Examples include
-// com.google.android.gms:play-services-base:15.0.1 and com.google.android.gms:play-services-cast:15.0.0
+// com.google.android.gms:play-services-base:15.0.1 and com.google.android.gms:play-services-basement:15.0.0
 configurations.all {
     resolutionStrategy {
         eachDependency { DependencyResolveDetails details ->
-            if (details.requested.group == 'com.google.android.gms') {
+            if (details.requested.group == 'com.google.android.gms'
+                    && details.requested.name != 'play-services-cast') {
                 details.useVersion "$google_play_services_version"
             }
         }
     }
 }
 
 android.applicationVariants.all { variant ->
     if (!mozconfig.substs.MOZILLA_OFFICIAL) {