Bug 1372486 - Part 3: Support mach/gradle build for Photon with its resources. r?nalexander,maliu,nechen,walkingice draft
authorjwu <jwu@mozilla.com>
Sat, 17 Jun 2017 01:46:55 +0800
changeset 596674 afd802f62ec97ddd2375f0edeb40f95ac2e1b57a
parent 596673 b580f64a10426e4fdabb5ced66fa702fbac6490e
child 596675 4710baf6c8da2fe151c7197b273ff779484db62c
push id64713
push userbmo:topwu.tw@gmail.com
push dateMon, 19 Jun 2017 15:55:59 +0000
reviewersnalexander, maliu, nechen, walkingice
bugs1372486
milestone56.0a1
Bug 1372486 - Part 3: Support mach/gradle build for Photon with its resources. r?nalexander,maliu,nechen,walkingice MozReview-Commit-ID: DMzYPgzcEq2
mobile/android/base/moz.build
mobile/android/moz.configure
--- 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')