Bug 1389257 - Set MOZ_ANDROID_POCKET only for nightly, beta, release builds. r?chmanchester
MozReview-Commit-ID: JRgBimDVRa6
--- a/mobile/android/base/generate_build_config.py
+++ b/mobile/android/base/generate_build_config.py
@@ -45,17 +45,16 @@ def _defines():
'MOZ_ANDROID_EXCLUDE_FONTS',
'MOZ_ANDROID_GCM',
'MOZ_ANDROID_MLS_STUMBLER',
'MOZ_ANDROID_MMA',
'MOZ_ANDROID_MOZILLA_ONLINE',
'MOZ_ANDROID_PWA',
'MOZ_LEANPLUM_SDK_KEY',
'MOZ_LEANPLUM_SDK_CLIENTID',
- 'MOZ_ANDROID_POCKET',
'MOZ_ANDROID_SEARCH_ACTIVITY',
'MOZ_CRASHREPORTER',
'MOZ_DEBUG',
'MOZ_INSTALL_TRACKING',
'MOZ_NATIVE_DEVICES',
'MOZ_SWITCHBOARD'):
if CONFIG[var]:
DEFINES[var] = 1
--- a/mobile/android/config/mozconfigs/android-aarch64/debug
+++ b/mobile/android/config/mozconfigs/android-aarch64/debug
@@ -5,12 +5,13 @@ ac_add_options --enable-debug
ac_add_options --enable-marionette
# Android
ac_add_options --with-android-min-sdk=21
ac_add_options --target=aarch64-linux-android
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
+export MOZ_ANDROID_POCKET
ac_add_options --with-branding=mobile/android/branding/nightly
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
--- a/mobile/android/config/mozconfigs/android-aarch64/nightly
+++ b/mobile/android/config/mozconfigs/android-aarch64/nightly
@@ -9,10 +9,11 @@ ac_add_options --target=aarch64-linux-an
ac_add_options --with-branding=mobile/android/branding/nightly
# This will overwrite the default of stripping everything and keep the symbol table.
# This is useful for profiling with eideticker. See bug 788680
STRIP_FLAGS="--strip-debug"
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
+export MOZ_ANDROID_POCKET=1
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
--- a/mobile/android/config/mozconfigs/android-api-15-frontend/nightly
+++ b/mobile/android/config/mozconfigs/android-api-15-frontend/nightly
@@ -35,10 +35,11 @@ ac_add_options --target=arm-linux-androi
ac_add_options --with-branding=mobile/android/branding/nightly
# This will overwrite the default of stripping everything and keep the symbol table.
# This is useful for profiling with eideticker. See bug 788680
STRIP_FLAGS="--strip-debug"
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
+export MOZ_ANDROID_POCKET=1
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
--- a/mobile/android/config/mozconfigs/android-api-15-gradle-dependencies/nightly
+++ b/mobile/android/config/mozconfigs/android-api-15-gradle-dependencies/nightly
@@ -37,16 +37,17 @@ ac_add_options --target=arm-linux-androi
ac_add_options --with-branding=mobile/android/branding/nightly
# This will overwrite the default of stripping everything and keep the symbol table.
# This is useful for profiling with eideticker. See bug 788680
STRIP_FLAGS="--strip-debug"
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
+export MOZ_ANDROID_POCKET=1
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
# End ../android-api-15-frontend/nightly.
# Populated after checking out the sources and before building the
# tree as part of the dependencies task bin/ scripts.
ac_add_options --with-android-sdk="/home/worker/.mozbuild/android-sdk-linux"
--- a/mobile/android/config/mozconfigs/android-x86/debug
+++ b/mobile/android/config/mozconfigs/android-x86/debug
@@ -4,12 +4,13 @@
ac_add_options --enable-debug
# Android
ac_add_options --target=i386-linux-android
ac_add_options --with-android-min-sdk=16
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
+export MOZ_ANDROID_POCKET=1
ac_add_options --with-branding=mobile/android/branding/nightly
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
--- a/mobile/android/config/mozconfigs/android-x86/nightly
+++ b/mobile/android/config/mozconfigs/android-x86/nightly
@@ -8,10 +8,11 @@ ac_add_options --enable-profiling
ac_add_options --with-branding=mobile/android/branding/nightly
# This will overwrite the default of stripping everything and keep the symbol table.
# This is useful for profiling with eideticker. See bug 788680
STRIP_FLAGS="--strip-debug"
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
+export MOZ_ANDROID_POCKET=1
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
--- a/mobile/android/config/mozconfigs/android-x86/nightly-old-id
+++ b/mobile/android/config/mozconfigs/android-x86/nightly-old-id
@@ -8,10 +8,11 @@ ac_add_options --with-android-min-sdk=16
ac_add_options --with-branding=mobile/android/branding/nightly-old-id
# This will overwrite the default of stripping everything and keep the symbol table.
# This is useful for profiling with eideticker. See bug 788680
STRIP_FLAGS="--strip-debug"
export MOZILLA_OFFICIAL=1
export MOZ_TELEMETRY_REPORTING=1
+export MOZ_ANDROID_POCKET=1
. "$topsrcdir/mobile/android/config/mozconfigs/common.override"
--- a/mobile/android/config/mozconfigs/common
+++ b/mobile/android/config/mozconfigs/common
@@ -74,18 +74,20 @@ elif test "$MOZ_UPDATE_CHANNEL" = "beta"
ac_add_options --with-leanplum-sdk-keyfile=/builds/leanplum-sdk-beta.token
elif test "$MOZ_UPDATE_CHANNEL" = "nightly" ; then
ac_add_options --with-leanplum-sdk-keyfile=/builds/leanplum-sdk-nightly.token
else
ac_add_options --with-leanplum-sdk-keyfile="$topsrcdir/mobile/android/base/leanplum-sdk-sandbox.token"
fi
# MOZ_ANDROID_POCKET depends on --with-pocket-api-keyfile, and will
-# fail if MOZ_ANDROID_POCKET is specified but a keyfile is not. We set a default
-# dummy key for non-channel builds, because Pocket is not a critical component.
+# fail if MOZ_ANDROID_POCKET is specified but a keyfile is not. There's no default
+# keyfile set, so if we misconfigure beta or release or nightly, the builds will
+# fail (at configure time).
+# Otherwise, Pocket is not a critical component so it can be built with a dummy key.
if test "$MOZ_UPDATE_CHANNEL" = "release" ; then
ac_add_options --with-pocket-api-keyfile=/builds/pocket-api-release.token
elif test "$MOZ_UPDATE_CHANNEL" = "beta" ; then
ac_add_options --with-pocket-api-keyfile=/builds/pocket-api-beta.token
elif test "$MOZ_UPDATE_CHANNEL" = "nightly" ; then
ac_add_options --with-pocket-api-keyfile=/builds/pocket-api-nightly.token
else
ac_add_options --with-pocket-api-keyfile="$topsrcdir/mobile/android/base/pocket-api-sandbox.token"
--- a/mobile/android/moz.configure
+++ b/mobile/android/moz.configure
@@ -41,17 +41,17 @@ option(env='MOZ_ANDROID_MMA',
help='Enable mobile marketing automation (currently using the Leanplum SDK).',
default=False)
set_config('MOZ_ANDROID_MMA',
depends_if('MOZ_ANDROID_MMA')(lambda _: True))
option(env='MOZ_ANDROID_POCKET',
help='Enable Pocket Stories in Activity Stream.',
- default=True)
+ default=False)
set_config('MOZ_ANDROID_POCKET',
depends_if('MOZ_ANDROID_POCKET')(lambda _: True))
project_flag('MOZ_ANDROID_DOWNLOADS_INTEGRATION',
help='Enable system download manager on Android',
default=True)