Bug 1447729 - Specify Android support lib dependency in gradle r=nalexander
MozReview-Commit-ID: 6r8tI1v2SeC
--- a/build.gradle
+++ b/build.gradle
@@ -46,16 +46,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'
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
@@ -208,26 +208,26 @@ android {
// we have tests that start test servers and the bound ports
// collide. We'll fix this soon to have much faster test cycles.
maxParallelForks 1
}
}
}
dependencies {
- implementation "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
- implementation "com.android.support:appcompat-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
- implementation "com.android.support:cardview-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
- implementation "com.android.support:recyclerview-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
- implementation "com.android.support:design:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
- implementation "com.android.support:customtabs:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
- implementation "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
+ implementation "com.android.support:support-v4:$support_library_version"
+ implementation "com.android.support:appcompat-v7:$support_library_version"
+ 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:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
+ 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}"
}
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}"
--- a/mobile/android/geckoview/build.gradle
+++ b/mobile/android/geckoview/build.gradle
@@ -144,29 +144,29 @@ android {
assets {
}
}
}
}
dependencies {
- implementation "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
- implementation "com.android.support:palette-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
+ implementation "com.android.support:support-v4:$support_library_version"
+ implementation "com.android.support:palette-v7:$support_library_version"
testImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
testImplementation 'junit:junit:4.12'
testImplementation 'org.robolectric:robolectric:3.5.1'
testImplementation 'org.mockito:mockito-core:1.10.19'
androidTestImplementation "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
androidTestImplementation 'com.android.support.test:runner:0.5'
androidTestImplementation 'com.android.support.test:rules:0.5'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
- androidTestImplementation "com.android.support:support-annotations:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
+ androidTestImplementation "com.android.support:support-annotations:$support_library_version"
}
apply from: "${topsrcdir}/mobile/android/gradle/with_gecko_binaries.gradle"
android.libraryVariants.all { variant ->
// See the notes in mobile/android/app/build.gradle for details on including
// Gecko binaries and the Omnijar.
if ((variant.productFlavors*.name).contains('withGeckoBinaries')) {
--- a/mobile/android/geckoview_example/build.gradle
+++ b/mobile/android/geckoview_example/build.gradle
@@ -27,18 +27,18 @@ android {
project.configureProductFlavors.delegate = it
project.configureProductFlavors()
}
dependencies {
testImplementation 'junit:junit:4.12'
- implementation 'com.android.support:support-annotations:23.4.0'
+ implementation 'com.android.support:support-annotations:$support_library_version'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:2.2.2'
androidTestImplementation 'com.android.support.test:runner:0.5'
// Not defining this library again results in test-app assuming 23.1.1, and the following errors:
// "Conflict with dependency 'com.android.support:support-annotations'. Resolved versions for app (23.4.0) and test app (23.1.1) differ."
- androidTestImplementation 'com.android.support:support-annotations:23.4.0'
+ androidTestImplementation 'com.android.support:support-annotations:$support_library_version'
implementation project(path: ':geckoview')
}
--- a/mobile/android/moz.configure
+++ b/mobile/android/moz.configure
@@ -111,19 +111,16 @@ option(env='MOZ_ANDROID_MOZILLA_ONLINE',
set_config('MOZ_ANDROID_MOZILLA_ONLINE',
depends_if('MOZ_ANDROID_MOZILLA_ONLINE')(lambda _: True))
imply_option('MOZ_SERVICES_HEALTHREPORT', True)
imply_option('MOZ_ANDROID_HISTORY', True)
imply_option('--enable-small-chunk-size', True)
-set_config('ANDROID_SUPPORT_LIBRARY_VERSION', '23.4.0')
-add_old_configure_assignment('ANDROID_SUPPORT_LIBRARY_VERSION', '23.4.0')
-
@depends(target)
def check_target(target):
if target.os != 'Android':
log.error('You must specify --target=arm-linux-androideabi (or some '
'other valid Android target) when building mobile/android.')
die('See https://developer.mozilla.org/docs/Mozilla/Developer_guide/'
'Build_Instructions/Simple_Firefox_for_Android_build '
'for more information about the necessary options.')
--- a/mobile/android/thirdparty/build.gradle
+++ b/mobile/android/thirdparty/build.gradle
@@ -38,20 +38,20 @@ android {
// here is only the no-op library for mach-based builds.
exclude 'com/squareup/leakcanary/**'
}
}
}
}
dependencies {
- implementation "com.android.support:support-v4:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
+ implementation "com.android.support:support-v4:$support_library_version"
if (mozconfig.substs.MOZ_ANDROID_MMA) {
- implementation "com.android.support:appcompat-v7:${mozconfig.substs.ANDROID_SUPPORT_LIBRARY_VERSION}"
- implementation "com.android.support:support-annotations:${mozconfig.substs.ANDROID_GOOGLE_PLAY_SERVICES_VERSION}"
+ 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}"
}
}
apply plugin: 'idea'
idea {
module {