Bug 1363526 - Revert .App rewriting to restore Android Studio launch for developers. r=maliu
Per https://bugzilla.mozilla.org/show_bug.cgi?id=1320310#c14, the fix
for
Bug 1320310 interferes with the Android Studio launch experience.
This reverts that change for non-official audiences, i.e., the
local{Old} configurations used by developers.
MozReview-Commit-ID: 2Mc5MUj8Utl
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -504,20 +504,28 @@ android.applicationVariants.all { varian
}
// Bug 1353055 - Strip 'vars' debugging information to agree with moz.build.
apply from: "${topsrcdir}/mobile/android/gradle/debug_level.gradle"
android.applicationVariants.all configureVariantDebugLevel
// Bug 1320310 - Hack up the manifest produced by Gradle to match that produced
-// by moz.build.
+// by moz.build. Per https://bugzilla.mozilla.org/show_bug.cgi?id=1320310#c14,
+// this breaks launching in Android Studio; therefore, we only do this for
+// official automation builds and not for local developer builds.
import groovy.xml.XmlUtil
android.applicationVariants.all { variant ->
+ // Like 'local', 'localOld', or 'official'.
+ def audienceDimension = variant.productFlavors[0].name
+ if (!audienceDimension.equals('official')) {
+ return
+ }
+
variant.outputs.each { output ->
output.processManifest.doLast {
[output.processManifest.manifestOutputFile,
output.processManifest.instantRunManifestOutputFile,
].each({ File manifestOutFile ->
if (manifestOutFile.exists()) {
def contents = manifestOutFile.getText('UTF-8')