Bug 1411688 - Part 0: Make --with-gradle handle single-locale repack ABIs. r=snorp
This agrees with
http://searchfox.org/mozilla-central/rev/423b2522c48e1d654e30ffc337164d677f934ec3/mobile/android/base/generate_build_config.py#95.
It should really come from the underlying binaries for repacks, but
right now we only repack ARM builds, so this will do.
MozReview-Commit-ID: 3UvrJDV1l9a
--- a/mobile/android/geckoview/build.gradle
+++ b/mobile/android/geckoview/build.gradle
@@ -50,17 +50,18 @@ android {
versionCode computeVersionCode()
versionName "${mozconfig.substs.MOZ_APP_VERSION}-${mozconfig.substs.MOZ_UPDATE_CHANNEL}"
consumerProguardFiles 'proguard-rules.txt'
// TODO: ensure these fields always agree with mobile/android/geckoview/BuildConfig.java.in,
// either by diffing the processed files or by generating the output from a single source.
buildConfigField 'String', "GRE_MILESTONE", "\"${mozconfig.substs.GRE_MILESTONE}\""
- buildConfigField 'String', "MOZ_APP_ABI", "\"${mozconfig.substs.TARGET_XPCOM_ABI}\"";
+ // This should really come from the included binaries, but that's not easy.
+ buildConfigField 'String', "MOZ_APP_ABI", mozconfig.substs['COMPILE_ENVIRONMENT'] ? "\"${ mozconfig.substs.TARGET_XPCOM_ABI}\"" : '"arm-eabi-gcc3"';
buildConfigField 'String', "MOZ_APP_BASENAME", "\"${mozconfig.substs.MOZ_APP_BASENAME}\"";
// For the benefit of future archaeologists:
// GRE_BUILDID is exactly the same as MOZ_APP_BUILDID unless you're running
// on XULRunner, which is never the case on Android.
//
// Mimic Python: open(os.path.join(buildconfig.topobjdir, 'buildid.h')).readline().split()[2]
buildConfigField 'String', "MOZ_APP_BUILDID", "\"${file("${topobjdir}/buildid.h").getText('utf-8').split()[2]}\"";