Bug 1189306 - Add Android Design Support library to gradle and mach builds. r=nalexander

This commit is contained in:
Sebastian Kaspari 2015-10-15 13:01:32 +02:00
parent ba7369d4c8
commit 066f8a25de
4 changed files with 10 additions and 0 deletions

View File

@ -433,6 +433,7 @@ case "$target" in
AC_SUBST(ANDROID_TOOLS)
MOZ_ANDROID_AAR(appcompat-v7, 23.0.1, android, com/android/support)
MOZ_ANDROID_AAR(design, 23.0.1, android, com/android/support)
MOZ_ANDROID_AAR(recyclerview-v7, 23.0.1, android, com/android/support)
MOZ_ANDROID_AAR(support-v4, 23.0.1, android, com/android/support, REQUIRED_INTERNAL_IMPL)

View File

@ -58,6 +58,7 @@ JAVA_CLASSPATH += \
$(ANDROID_SUPPORT_V4_AAR_LIB) \
$(ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB) \
$(ANDROID_APPCOMPAT_V7_AAR_LIB) \
$(ANDROID_DESIGN_AAR_LIB) \
$(ANDROID_RECYCLERVIEW_V7_AAR_LIB) \
$(NULL)
@ -81,6 +82,7 @@ java_bundled_libs := \
$(ANDROID_SUPPORT_V4_AAR_LIB) \
$(ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB) \
$(ANDROID_APPCOMPAT_V7_AAR_LIB) \
$(ANDROID_DESIGN_AAR_LIB) \
$(ANDROID_RECYCLERVIEW_V7_AAR_LIB) \
$(NULL)
@ -363,6 +365,7 @@ generated/org/mozilla/gecko/R.java: .aapt.deps ;
# If native devices are enabled, add Google Play Services, build their resources
generated/android/support/v4/R.java: .aapt.deps ;
generated/android/support/v7/appcompat/R.java: .aapt.deps ;
generated/android/support/design/R.java: .aapt.deps ;
generated/android/support/v7/mediarouter/R.java: .aapt.deps ;
generated/android/support/v7/recyclerview/R.java: .aapt.deps ;
generated/com/google/android/gms/R.java: .aapt.deps ;

View File

@ -52,6 +52,10 @@ if CONFIG['ANDROID_APPCOMPAT_V7_AAR']:
ANDROID_EXTRA_PACKAGES += ['android.support.v7.appcompat']
ANDROID_EXTRA_RES_DIRS += ['%' + CONFIG['ANDROID_APPCOMPAT_V7_AAR_RES']]
resjar.generated_sources += ['android/support/v7/appcompat/R.java']
if CONFIG['ANDROID_DESIGN_AAR']:
ANDROID_EXTRA_PACKAGES += ['android.support.design']
ANDROID_EXTRA_RES_DIRS += ['%' + CONFIG['ANDROID_DESIGN_AAR_RES']]
resjar.generated_sources += ['android/support/design/R.java']
if CONFIG['ANDROID_RECYCLERVIEW_V7_AAR']:
ANDROID_EXTRA_PACKAGES += ['android.support.v7.recyclerview']
ANDROID_EXTRA_RES_DIRS += ['%' + CONFIG['ANDROID_RECYCLERVIEW_V7_AAR_RES']]
@ -688,6 +692,7 @@ if CONFIG['MOZ_NATIVE_DEVICES']:
resjar.generated_sources += ['com/google/android/gms/cast/R.java']
gbjar.extra_jars += [CONFIG['ANDROID_APPCOMPAT_V7_AAR_LIB']]
gbjar.extra_jars += [CONFIG['ANDROID_DESIGN_AAR_LIB']]
gbjar.extra_jars += [CONFIG['ANDROID_RECYCLERVIEW_V7_AAR_LIB']]
gbjar.javac_flags += ['-Xlint:all,-deprecation,-fallthrough', '-J-Xmx512m', '-J-Xms128m']

View File

@ -96,6 +96,7 @@ dependencies {
compile 'com.android.support:support-v4:23.0.1'
compile 'com.android.support:appcompat-v7:23.0.1'
compile 'com.android.support:recyclerview-v7:23.0.1'
compile 'com.android.support:design:23.0.1'
if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
compile 'com.android.support:mediarouter-v7:23.0.1'