Bug 1363526 - Revert .App rewriting to restore Android Studio launch for developers. r=maliu
authorNick Alexander <nalexander@mozilla.com>
Tue, 09 May 2017 14:06:18 -0700
changeset 409056 c84d03ca612e7997d5e492380fd0346f780f097a
parent 409055 adff9e8ebb3c68949003d8e8b4691a6a5afe4bc8
child 409057 94245f1ea0b51b1e9d28e1222c3c8fa143630a33
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmaliu
bugs1363526, 1320310
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
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
mobile/android/app/build.gradle
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -499,20 +499,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')