Bug 1372486 - Part 3: Support mach/gradle build for Photon with its resources. r?nalexander,maliu,nechen,walkingice
draft
Bug 1372486 - Part 3: Support mach/gradle build for Photon with its resources. r?nalexander,maliu,nechen,walkingice
MozReview-Commit-ID: DMzYPgzcEq2
--- a/mobile/android/base/moz.build
+++ b/mobile/android/base/moz.build
@@ -1365,16 +1365,28 @@ if CONFIG['MOZ_ANDROID_MMA']:
CONFIG['ANDROID_SUPPORT_V4_AAR_INTERNAL_LIB'],
CONFIG['ANDROID_SUPPORT_V4_AAR_LIB'],
'sync-thirdparty.jar',
]
# Putting branding earlier allows branders to override default resources.
ANDROID_RES_DIRS += [
'/' + CONFIG['MOZ_BRANDING_DIRECTORY'] + '/res',
+]
+
+if CONFIG['MOZ_ANDROID_PHOTON']:
+ ANDROID_RES_DIRS += [
+ '/mobile/android/app/src/photon/res',
+ ]
+else:
+ ANDROID_RES_DIRS += [
+ '/mobile/android/app/src/australis/res',
+ ]
+
+ANDROID_RES_DIRS += [
'/mobile/android/app/src/main/res',
'/mobile/android/services/src/main/res',
'!res',
]
ANDROID_GENERATED_RESFILES += [
'res/raw/browsersearch.json',
'res/raw/suggestedsites.json',
--- a/mobile/android/moz.configure
+++ b/mobile/android/moz.configure
@@ -95,16 +95,25 @@ set_config('MOZ_ANDROID_MOZILLA_ONLINE',
option(env='MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER',
help='Build and package the install bouncer APK',
default=True)
set_config('MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER',
depends_if('MOZ_ANDROID_PACKAGE_INSTALL_BOUNCER')(lambda _: True))
+option('--enable-photon', help='Enable Photon skin', default=False)
+
+@depends('--enable-photon')
+def photon_skin(value):
+ if value:
+ return True
+
+set_config('MOZ_ANDROID_PHOTON', photon_skin)
+
imply_option('MOZ_SOCIAL', False)
imply_option('MOZ_SERVICES_HEALTHREPORT', True)
imply_option('MOZ_ANDROID_HISTORY', True)
set_config('ANDROID_SUPPORT_LIBRARY_VERSION', '23.4.0')
add_old_configure_assignment('ANDROID_SUPPORT_LIBRARY_VERSION', '23.4.0')
set_config('ANDROID_GOOGLE_PLAY_SERVICES_VERSION', '8.4.0')