Bug 1411688 - Part 0: Make --with-gradle handle single-locale repack ABIs. r=snorp draft
authorNick Alexander <nalexander@mozilla.com>
Thu, 02 Nov 2017 09:38:47 -0700
changeset 693056 e57b49e32c80906bdb513850c370d64e5a140978
parent 693006 66f496680fae6e7d8f02bc17ff58b9234ee07c70
child 693057 b0440ceb318662bf3c08f2139c51dae5775a6b38
push id87692
push usernalexander@mozilla.com
push dateSat, 04 Nov 2017 00:26:38 +0000
reviewerssnorp
bugs1411688
milestone58.0a1
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
mobile/android/geckoview/build.gradle
--- 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]}\"";