mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1171288 - Add ability to build with RecyclerView support library. r=nalexander
This commit is contained in:
parent
1c9aae1292
commit
202877b136
@ -260,6 +260,16 @@ if test -n "$MOZ_NATIVE_DEVICES" ; then
|
||||
AC_SUBST(ANDROID_APPCOMPAT_LIB)
|
||||
AC_SUBST(ANDROID_APPCOMPAT_RES)
|
||||
|
||||
ANDROID_RECYCLERVIEW_LIB="$ANDROID_COMPAT_DIR_BASE/v7/recyclerview/libs/android-support-v7-recyclerview.jar"
|
||||
ANDROID_RECYCLERVIEW_RES="$ANDROID_COMPAT_DIR_BASE/v7/recyclerview/res"
|
||||
AC_MSG_CHECKING([for v7 recyclerview library])
|
||||
if ! test -e $ANDROID_RECYCLERVIEW_LIB ; then
|
||||
AC_MSG_ERROR([You must download the v7 recyclerview Android support library. Run the Android SDK tool and install Android Support Library under Extras. See https://developer.android.com/tools/extras/support-library.html for more info. (looked for $ANDROID_RECYCLERVIEW_LIB)])
|
||||
fi
|
||||
AC_MSG_RESULT([$ANDROID_RECYCLERVIEW_LIB])
|
||||
AC_SUBST(ANDROID_RECYCLERVIEW_LIB)
|
||||
AC_SUBST(ANDROID_RECYCLERVIEW_RES)
|
||||
|
||||
ANDROID_MEDIAROUTER_LIB="$ANDROID_COMPAT_DIR_BASE/v7/mediarouter/libs/android-support-v7-mediarouter.jar"
|
||||
ANDROID_MEDIAROUTER_RES="$ANDROID_COMPAT_DIR_BASE/v7/mediarouter/res"
|
||||
AC_MSG_CHECKING([for v7 mediarouter library])
|
||||
|
@ -64,6 +64,8 @@ JAVA_BOOTCLASSPATH := \
|
||||
|
||||
JAVA_BOOTCLASSPATH := $(subst $(NULL) ,:,$(strip $(JAVA_BOOTCLASSPATH)))
|
||||
|
||||
JAVA_CLASSPATH += $(ANDROID_RECYCLERVIEW_LIB)
|
||||
|
||||
# If native devices are enabled, add Google Play Services and some of the v7
|
||||
# compat libraries.
|
||||
ifdef MOZ_NATIVE_DEVICES
|
||||
@ -80,6 +82,7 @@ JAVA_CLASSPATH := $(subst $(NULL) ,:,$(strip $(JAVA_CLASSPATH)))
|
||||
# into classes.dex.
|
||||
java_bundled_libs := \
|
||||
$(ANDROID_COMPAT_LIB) \
|
||||
$(ANDROID_RECYCLERVIEW_LIB) \
|
||||
$(NULL)
|
||||
|
||||
ifdef MOZ_NATIVE_DEVICES
|
||||
@ -369,6 +372,7 @@ generated/org/mozilla/gecko/R.java: .aapt.deps ;
|
||||
# If native devices are enabled, add Google Play Services, build their resources
|
||||
generated/android/support/v7/appcompat/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 ;
|
||||
|
||||
ifdef MOZ_NATIVE_DEVICES
|
||||
@ -382,6 +386,9 @@ ifdef MOZ_NATIVE_DEVICES
|
||||
extra_res_dirs += $(GOOGLE_PLAY_SERVICES_RES)
|
||||
endif
|
||||
|
||||
extra_packages += android.support.v7.recyclerview
|
||||
extra_res_dirs += $(ANDROID_RECYCLERVIEW_RES)
|
||||
|
||||
gecko.ap_: .aapt.deps ;
|
||||
R.txt: .aapt.deps ;
|
||||
|
||||
|
@ -44,6 +44,8 @@ if CONFIG['MOZ_NATIVE_DEVICES']:
|
||||
resjar.generated_sources += ['android/support/v7/appcompat/R.java']
|
||||
resjar.generated_sources += ['android/support/v7/mediarouter/R.java']
|
||||
|
||||
resjar.generated_sources += ['android/support/v7/recyclerview/R.java']
|
||||
|
||||
resjar.javac_flags += ['-Xlint:all']
|
||||
|
||||
mgjar = add_java_jar('gecko-mozglue')
|
||||
@ -616,6 +618,7 @@ moz_native_devices_sources = [
|
||||
if CONFIG['MOZ_NATIVE_DEVICES']:
|
||||
gbjar.extra_jars += moz_native_devices_jars
|
||||
gbjar.sources += moz_native_devices_sources
|
||||
gbjar.extra_jars += [CONFIG['ANDROID_RECYCLERVIEW_LIB']]
|
||||
|
||||
gbjar.javac_flags += ['-Xlint:all,-deprecation,-fallthrough', '-J-Xmx512m', '-J-Xms128m']
|
||||
|
||||
|
@ -48,6 +48,7 @@ android {
|
||||
|
||||
dependencies {
|
||||
compile 'com.android.support:support-v4:22.2.0'
|
||||
compile 'com.android.support:recyclerview-v7:22.2.0'
|
||||
|
||||
if (mozconfig.substs.MOZ_NATIVE_DEVICES) {
|
||||
compile 'com.android.support:appcompat-v7:22.2.0'
|
||||
|
Loading…
Reference in New Issue
Block a user