Bug 1361545 - Add "skin" flavorDimension for Photon mobile work. r=sebastian draft
authorNick Alexander <nalexander@mozilla.com>
Tue, 02 May 2017 15:27:37 -0700
changeset 571973 477ef683f850ff11cfa128e17855666bb7758a7a
parent 571485 346f88882774f072316714cf637a54d771d81a9a
child 571984 18547322f5f1efcbc5e793bbce19774c09cdd8f4
push id56978
push usernalexander@mozilla.com
push dateWed, 03 May 2017 16:17:35 +0000
reviewerssebastian
bugs1361545
milestone55.0a1
Bug 1361545 - Add "skin" flavorDimension for Photon mobile work. r=sebastian This is pretty straight-forward. Sadly, this will require local developers to add a "skin" product flavor to their invocations, like: ./mach gradle app:assembleLocalAustralisDebug In addition, this shows how many different variants of the Gradle product flavor are embedded into our automation configurations. I can't solve that at this time. Since I was here, I took the time to rename "automation" to "official", which makes "localAustralis" the default in Android Studio, avoiding a common issue with new builders producing an APK that doesn't include omni.ja in the IDE. MozReview-Commit-ID: CtU7zFpNCob
mobile/android/app/build.gradle
mobile/android/base/Makefile.in
mobile/android/gradle/with_gecko_binaries.gradle
taskcluster/ci/android-stuff/kind.yml
testing/mozharness/configs/builds/releng_sub_android_configs/64_api_15_gradle_dependencies.py
testing/mozharness/configs/builds/releng_sub_android_configs/64_findbugs.py
testing/mozharness/configs/builds/releng_sub_android_configs/64_lint.py
testing/mozharness/configs/builds/releng_sub_android_configs/64_test.py
toolkit/mozapps/installer/upload-files-APK.mk
--- a/mobile/android/app/build.gradle
+++ b/mobile/android/app/build.gradle
@@ -68,35 +68,63 @@ android {
             proguardFile "${topsrcdir}/mobile/android/config/proguard/proguard.cfg"
         }
         release configureMinifyClosure
         if (mozconfig.substs.MOZILLA_OFFICIAL) {
             debug configureMinifyClosure
         }
     }
 
+    // The "audience" flavour dimension distinguishes between _local_ builds (intended for
+    // development) and _official_ builds (intended for testing in automation and to ship in one of
+    // the Fennec distribution channels).
+    //
+    // The "skin" flavor dimension distinguishes between different user interfaces.  We sometimes
+    // want to develop significant new user interface pieces in-tree that don't ship (even in the
+    // Nightly channel) while under development.  A new "skin" flavour allows us to develop such
+    // pieces in Gradle without changing the mainline configuration.
+    flavorDimensions "audience", "skin"
+
     productFlavors {
         // For API 21+ - with multi dex, this will be faster for local development.
         local {
+            dimension "audience"
+
             // For multi dex, setting `minSdkVersion 21` allows the Android gradle plugin to
             // pre-DEX each module and produce an APK that can be tested on
             // Android Lollipop without time consuming DEX merging processes.
             minSdkVersion 21
             dexOptions {
                 preDexLibraries true
                 multiDexEnabled true
             }
         }
         // For API < 21 - does not support multi dex because local development
         // is slow in that case. Most builds will not require multi dex so this
         // should not be an issue.
         localOld {
+            dimension "audience"
         }
-        // Automation builds.
-        automation {
+
+        // Automation builds.  We use "official" rather than "automation" to drive these builds down
+        // the list of configurations that Android Studio offers, thereby making it _not_ the
+        // default.  This avoids a common issue with "omni.ja" not being packed into the default APK
+        // built and deployed by Android Studio.
+        official {
+             dimension "audience"
+        }
+
+        // The default user interface.
+        australis {
+            dimension "skin"
+        }
+
+        // A new user interface, currently under development.
+        photon {
+            dimension "skin"
         }
     }
 
     sourceSets {
         main {
             manifest.srcFile "${project.buildDir}/generated/source/preprocessed_manifest/AndroidManifest.xml"
 
             aidl {
@@ -235,17 +263,18 @@ dependencies {
     // Include LeakCanary in most gradle based builds. LeakCanary adds about 5k methods, so we disable
     // it for the (non-proguarded, non-multidex) localOld builds to allow space for other libraries.
     // Gradle based tests include the no-op version.  Mach based builds only include the no-op version
     // of this library.
     // It doesn't seem like there is a non-trivial way to be conditional on 'localOld', so instead we explicitly
     // define a version of leakcanary for every flavor:
     localCompile 'com.squareup.leakcanary:leakcanary-android:1.4-beta1'
     localOldCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
-    automationCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
+    officialCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
+    officialCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
     testCompile 'com.squareup.leakcanary:leakcanary-android-no-op:1.4-beta1'
 
     compile project(':geckoview')
     compile project(':thirdparty')
 
     testCompile 'junit:junit:4.12'
     testCompile 'org.robolectric:robolectric:3.1.2'
     testCompile 'org.simpleframework:simple-http:6.0.1'
@@ -310,29 +339,28 @@ task rewriteManifestPackage(type: Copy, 
 
 apply from: "${topsrcdir}/mobile/android/gradle/with_gecko_binaries.gradle"
 
 android.applicationVariants.all { variant ->
     variant.preBuild.dependsOn rewriteManifestPackage
     variant.preBuild.dependsOn syncPreprocessedCode
     variant.preBuild.dependsOn syncPreprocessedResources
 
-    // Automation builds don't include Gecko binaries, since those binaries are
-    // not produced until after build time (at package time).  Therefore,
-    // automation builds include the Gecko binaries into the APK at package
-    // time.  The "withGeckoBinaries" variant of the :geckoview project also
-    // does this.  (It does what it says on the tin!)  For notes on this
+    // Official automation builds don't include Gecko binaries, since those binaries are not
+    // produced until after build time (at package time).  official Therefore, automation builds
+    // include the Gecko binaries into the APK at package time.  The "withGeckoBinaries" variant of
+    // the :geckoview project also does this.  (It does what it says on the tin!)  For notes on this
     // approach, see mobile/android/gradle/with_gecko_binaries.gradle.
 
     // Like 'local' or 'localOld'.
-    def productFlavor = variant.productFlavors[0].name
+    def audienceDimension = variant.productFlavors[0].name
 
     // :app uses :geckoview:release and handles it's own Gecko binary inclusion,
     // even though this would be most naturally done in the :geckoview project.
-    if (!productFlavor.equals('automation')) {
+    if (!audienceDimension.equals('official')) {
         configureVariantWithGeckoBinaries(variant)
     }
 }
 
 apply plugin: 'spoon'
 
 spoon {
     // For now, let's be verbose.
@@ -351,30 +379,30 @@ spoon {
         // Command line overrides everything.
         spoonPackageName = project.spoonPackageName
     }
     if (spoonPackageName) {
         instrumentationArgs = ['-e', "package=${spoonPackageName}".toString()]
     }
 }
 
-// See discussion at https://github.com/stanfy/spoon-gradle-plugin/issues/9.
-afterEvaluate {
-    tasks["spoonLocal${android.testBuildType.capitalize()}AndroidTest"].outputs.upToDateWhen { false }
+// // See discussion at https://github.com/stanfy/spoon-gradle-plugin/issues/9.
+// afterEvaluate {
+//     tasks["spoonLocal${android.testBuildType.capitalize()}AndroidTest"].outputs.upToDateWhen { false }
 
-    // This is an awkward way to define different sets of instrumentation tests.
-    // The task name itself is fished at runtime and the package name configured
-    // in the spoon configuration.
-    task runBrowserTests {
-        dependsOn tasks["spoonLocalOldDebugAndroidTest"]
-    }
-    task runBackgroundTests {
-        dependsOn tasks["spoonLocalOldDebugAndroidTest"]
-    }
-}
+//     // This is an awkward way to define different sets of instrumentation tests.
+//     // The task name itself is fished at runtime and the package name configured
+//     // in the spoon configuration.
+//     task runBrowserTests {
+//         dependsOn tasks["spoonLocalOldDebugAndroidTest"]
+//     }
+//     task runBackgroundTests {
+//         dependsOn tasks["spoonLocalOldDebugAndroidTest"]
+//     }
+// }
 
 // Bug 1299015: Complain to treeherder if checkstyle, lint, or unittest fails.  It's not obvious
 // how to listen to individual errors in most cases, so we just link to the reports for now.
 def makeTaskExecutionListener(artifactRootUrl) {
     return new TaskExecutionListener() {
         void beforeExecute(Task task) {
             // Do nothing.
         }
@@ -389,28 +417,43 @@ def makeTaskExecutionListener(artifactRo
             // taskcluster/ci/android-stuff/kind.yml.  It's not possible to link
             // directly, so for now consumers will need to copy-paste the URL.
             switch (task.path) {
             case ':app:checkstyle':
                 def url = "${artifactRootUrl}/public/android/checkstyle/checkstyle.xml"
                 println "TEST-UNEXPECTED-FAIL | android-checkstyle | Checkstyle rule violations were found. See the report at: $url"
                 break
 
-            case ':app:lintAutomationDebug':
-                def url = "${artifactRootUrl}/public/android/lint/lint-results-automationDebug.html"
+            case ':app:lintOfficialAustralisDebug':
+                def url = "${artifactRootUrl}/public/android/lint/lint-results-officialAustralisDebug.html"
                 println "TEST-UNEXPECTED-FAIL | android-lint | Lint found errors in the project; aborting build. See the report at: $url"
                 break
 
-            case ':app:testAutomationDebugUnitTest':
-                def url = "${artifactRootUrl}/public/android/unittest/automationDebug/index.html"
-                println "TEST-UNEXPECTED-FAIL | android-test | There were failing tests. See the report at: $url"
+            case ':app:testOfficialAustralisDebugUnitTest':
+                def url = "${artifactRootUrl}/public/android/unittest/officialAustralisDebug/index.html"
+                println "TEST-UNEXPECTED-FAIL | android-test | There were failing tests. See the reports at: $url"
+                break
+
+            case ':app:findbugsOfficialAustralisDebug':
+                def url = "${artifactRootUrl}/public/android/findbugs/findbugs-officialAustralisDebug-output.html"
+                println "TEST-UNEXPECTED-FAIL | android-findbugs | Findbugs found issues in the project. See the report at: $url"
                 break
 
-            case ':app:findbugsAutomationDebug':
-                def url = "${artifactRootUrl}/public/android/findbugs/findbugs-report.html"
+            case ':app:lintOfficialPhotonDebug':
+                def url = "${artifactRootUrl}/public/android/lint/lint-results-officialPhotonDebug.html"
+                println "TEST-UNEXPECTED-FAIL | android-lint | Lint found errors in the project; aborting build. See the report at: $url"
+                break
+
+            case ':app:testOfficialPhotonDebugUnitTest':
+                def url = "${artifactRootUrl}/public/android/unittest/officialPhotonDebug/index.html"
+                println "TEST-UNEXPECTED-FAIL | android-test | There were failing tests. See the reports at: $url"
+                break
+
+            case ':app:findbugsOfficialPhotonDebug':
+                def url = "${artifactRootUrl}/public/android/findbugs/findbugs-officialPhotonDebug-output.html"
                 println "TEST-UNEXPECTED-FAIL | android-findbugs | Findbugs found issues in the project. See the report at: $url"
                 break
             }
         }
     }
 }
 
 // TASK_ID and RUN_ID are provided by docker-worker; see
--- a/mobile/android/base/Makefile.in
+++ b/mobile/android/base/Makefile.in
@@ -203,21 +203,21 @@ endif # MOZ_INSTALL_TRACKING
 library_jars := $(subst $(NULL) ,:,$(strip $(library_jars)))
 
 gradle_dir := $(topobjdir)/gradle/build/mobile/android
 
 ifdef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
 .gradle.deps: .aapt.deps FORCE
 	@$(TOUCH) $@
 	$(topsrcdir)/mach gradle \
-		app:assembleAutomationDebug app:assembleAutomationDebugAndroidTest -x lint
+		app:assembleOfficialAustralisDebug app:assembleOfficialAustralisDebugAndroidTest -x lint
 
 classes.dex: .gradle.deps
 	$(REPORT_BUILD)
-	cp $(gradle_dir)/app/intermediates/transforms/dex/automation/debug/folders/1000/1f/main/classes.dex $@
+	cp $(gradle_dir)/app/intermediates/transforms/dex/officialAustralis/debug/folders/1000/1f/main/classes.dex $@
 else
 classes.dex: .proguard.deps
 	$(REPORT_BUILD)
 	$(DX) --dex --output=classes.dex jars-proguarded
 endif
 
 ifdef MOZ_DISABLE_PROGUARD
   PROGUARD_PASSES=0
@@ -449,17 +449,17 @@ endef
 # further no-op build do work.  See also
 # toolkit/mozapps/installer/packager.mk.
 
 # .aapt.deps: $(all_resources)
 $(eval $(call aapt_command,.aapt.deps,$(all_resources),gecko.ap_,generated/,./))
 
 ifdef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
 .aapt.nodeps: FORCE
-	cp $(gradle_dir)/app/intermediates/res/resources-automation-debug.ap_ gecko-nodeps.ap_
+	cp $(gradle_dir)/app/intermediates/res/resources-official-australis-debug.ap_ gecko-nodeps.ap_
 else
 # .aapt.nodeps: AndroidManifest.xml FORCE
 $(eval $(call aapt_command,.aapt.nodeps,AndroidManifest.xml FORCE,gecko-nodeps.ap_,gecko-nodeps/,gecko-nodeps/))
 endif
 
 # Override the Java settings with some specific android settings
 include $(topsrcdir)/config/android-common.mk
 
--- a/mobile/android/gradle/with_gecko_binaries.gradle
+++ b/mobile/android/gradle/with_gecko_binaries.gradle
@@ -5,23 +5,23 @@
 
 // We run fairly hard into a fundamental limitation of the Android Gradle
 // plugin.  There are many bugs filed about this, but
 // https://code.google.com/p/android/issues/detail?id=216978#c6 is a reason one.
 // The issue is that we need fine-grained control over when to include Gecko's
 // binary libraries into the GeckoView AAR and the Fennec APK, and that's hard
 // to achieve.  In particular:
 //
-// * :app:automation wants :geckoview to not include Gecko binaries (automation
-// * build, before package)
+// * :app:official* wants :geckoview to not include Gecko binaries (official
+// *  automation build, before package)
 //
 // * :geckoview:withLibraries wants :geckoview to include Gecko binaries
 // * (automation build, after package)
 //
-// * non-:app:automation wants :geckoview to include Gecko binaries (local
+// * non-:app:official* wants :geckoview to include Gecko binaries (local
 // * build, always after package)
 //
 // publishNonDefault (see
 // http://tools.android.com/tech-docs/new-build-system/user-guide#TOC-Library-Publication)
 // is intended to address this, but doesn't handle our case.  That option always
 // builds *all* configurations, which fails when the required Gecko binaries
 // don't exist (automation build, before package).  So instead, we make both
 // :app and :geckoview both know how to include the Gecko binaries, and use a
@@ -91,18 +91,27 @@ task checkAssetsExistInDistDir<< {
 task syncAssetsFromDistDir(type: Sync, dependsOn: checkAssetsExistInDistDir) {
     into("${project.buildDir}/generated/assets")
     from("${topobjdir}/dist/fennec/assets") {
         exclude 'omni.ja'
     }
 }
 
 ext.configureVariantWithGeckoBinaries = { variant ->
-    // Like 'local' or 'localOld'; may be null.
-    def productFlavor = variant.productFlavors ? variant.productFlavors[0].name : ""
+    // Like 'localAustralis' or 'localOldAustralis'; may be null.
+    def productFlavor = ""
+    def productFlavorNames = variant.productFlavors.collect { it.name.capitalize() }
+    if (!productFlavorNames.isEmpty()) {
+        productFlavor = productFlavorNames.join()
+        // Groovy's `uncapitilize` is not yet available.
+        def c = productFlavor.toCharArray()
+        c[0] = Character.toLowerCase(c[0])
+        productFlavor = new String(c)
+    }
+
     // Like 'debug' or 'release'.
     def buildType = variant.buildType.name
 
     syncOmnijarFromDistDir.dependsOn buildOmnijar
     def generateAssetsTask = tasks.findByName("generate${productFlavor.capitalize()}${buildType.capitalize()}Assets")
     generateAssetsTask.dependsOn syncOmnijarFromDistDir
     generateAssetsTask.dependsOn syncLibsFromDistDir
     generateAssetsTask.dependsOn syncAssetsFromDistDir
--- a/taskcluster/ci/android-stuff/kind.yml
+++ b/taskcluster/ci/android-stuff/kind.yml
@@ -133,24 +133,33 @@ jobs:
                 MH_CUSTOM_BUILD_VARIANT_CFG: "android-lint"
                 MOZHARNESS_ACTIONS: "get-secrets build multi-l10n update"
                 MOZHARNESS_CONFIG: >
                     builds/releng_base_android_64_builds.py
                     disable_signing.py
                     platform_supports_post_upload_to_latest.py
                 MOZHARNESS_SCRIPT: "mozharness/scripts/fx_desktop_build.py"
             artifacts:
-              - name: public/android/lint/lint-results-automationDebug.html
-                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/lint-results-automationDebug.html
+              - name: public/android/lint/lint-results-officialAustralisDebug.html
+                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/lint-results-officialAustralisDebug.html
+                type: file
+              - name: public/android/lint/lint-results-officialAustralisDebug.xml
+                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/lint-results-officialAustralisDebug.xml
                 type: file
-              - name: public/android/lint/lint-results-automationDebug.xml
-                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/lint-results-automationDebug.xml
+              - name: public/android/lint/lint-results-officialAustralisDebug_files
+                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/lint-results-officialAustralisDebug_files
+                type: directory
+              - name: public/android/lint/lint-results-officialPhotonDebug.html
+                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/lint-results-officialPhotonDebug.html
                 type: file
-              - name: public/android/lint/lint-results-automationDebug_files
-                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/lint-results-automationDebug_files
+              - name: public/android/lint/lint-results-officialPhotonDebug.xml
+                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/lint-results-officialPhotonDebug.xml
+                type: file
+              - name: public/android/lint/lint-results-officialPhotonDebug_files
+                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/lint-results-officialPhotonDebug_files
                 type: directory
               - name: public/build
                 path: /home/worker/artifacts/
                 type: directory
             caches:
               - name: tooltool-cache
                 mount-point: /home/worker/tooltool-cache
                 type: persistent
@@ -247,18 +256,21 @@ jobs:
                 MH_CUSTOM_BUILD_VARIANT_CFG: "android-findbugs"
                 MOZHARNESS_ACTIONS: "get-secrets build multi-l10n update"
                 MOZHARNESS_CONFIG: >
                     builds/releng_base_android_64_builds.py
                     disable_signing.py
                     platform_supports_post_upload_to_latest.py
                 MOZHARNESS_SCRIPT: "mozharness/scripts/fx_desktop_build.py"
             artifacts:
-              - name: public/android/findbugs/findbugs-report.html
-                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/findbugs/findbugs-automationDebug-output.html
+              - name: public/android/findbugs/findbugs-officialAustralisDebug-output.html
+                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/findbugs/findbugs-officialAustralisDebug-output.html
+                type: file
+              - name: public/android/findbugs/findbugs-officialPhotonDebug-output.html
+                path: /home/worker/workspace/build/src/obj-firefox/gradle/build/mobile/android/app/outputs/findbugs/findbugs-officialPhotonDebug-output.html
                 type: file
               - name: public/build
                 path: /home/worker/artifacts/
                 type: directory
             caches:
               - name: tooltool-cache
                 mount-point: /home/worker/tooltool-cache
                 type: persistent
--- a/testing/mozharness/configs/builds/releng_sub_android_configs/64_api_15_gradle_dependencies.py
+++ b/testing/mozharness/configs/builds/releng_sub_android_configs/64_api_15_gradle_dependencies.py
@@ -2,22 +2,26 @@ config = {
     'base_name': 'Android armv7 API 15+ Gradle dependencies %(branch)s',
     'stage_platform': 'android-api-15-gradle-dependencies',
     'build_type': 'api-15-opt',
     'src_mozconfig': 'mobile/android/config/mozconfigs/android-api-15-gradle-dependencies/nightly',
     'tooltool_manifest_src': 'mobile/android/config/tooltool-manifests/android-gradle-dependencies/releng.manifest',
     'multi_locale_config_platform': 'android',
     'postflight_build_mach_commands': [
         ['gradle',
-         'assembleAutomationRelease',
-         'assembleAutomationDebug',
-         'assembleAutomationDebugAndroidTest',
-         'checkstyle',
-         'findbugsAutomationDebug',
+         'app:assembleOfficialAustralisRelease',
+         'app:assembleOfficialAustralisDebug',
+         'app:assembleOfficialAustralisDebugAndroidTest',
+         'app:findbugsOfficialAustralisDebug',
+         'app:assembleOfficialPhotonRelease',
+         'app:assembleOfficialPhotonDebug',
+         'app:assembleOfficialPhotonDebugAndroidTest',
+         'app:findbugsOfficialPhotonDebug',
          # Does not include Gecko binaries -- see mobile/android/gradle/with_gecko_binaries.gradle.
          'geckoview:assembleWithoutGeckoBinaries',
          # So that we pick up the test dependencies for the builders.
          'geckoview_example:assembleWithoutGeckoBinaries',
          'geckoview_example:assembleWithoutGeckoBinariesAndroidTest',
+         'checkstyle',
         ],
     ],
     'artifact_flag_build_variant_in_try': None, # There's no artifact equivalent.
 }
--- a/testing/mozharness/configs/builds/releng_sub_android_configs/64_findbugs.py
+++ b/testing/mozharness/configs/builds/releng_sub_android_configs/64_findbugs.py
@@ -1,12 +1,15 @@
 config = {
     'base_name': 'Android findbugs %(branch)s',
     'stage_platform': 'android-findbugs',
     'build_type': 'api-15-opt',
     'src_mozconfig': 'mobile/android/config/mozconfigs/android-api-15-frontend/nightly',
     'tooltool_manifest_src': 'mobile/android/config/tooltool-manifests/android-frontend/releng.manifest',
     'multi_locale_config_platform': 'android',
     'postflight_build_mach_commands': [
-        ['gradle', 'app:findbugsAutomationDebug'],
+        ['gradle',
+         'app:findbugsOfficialAustralisDebug',
+         'app:findbugsOfficialPhotonDebug',
+        ],
     ],
     'artifact_flag_build_variant_in_try': None, # There's no artifact equivalent.
 }
--- a/testing/mozharness/configs/builds/releng_sub_android_configs/64_lint.py
+++ b/testing/mozharness/configs/builds/releng_sub_android_configs/64_lint.py
@@ -1,12 +1,15 @@
 config = {
     'base_name': 'Android lint %(branch)s',
     'stage_platform': 'android-lint',
     'build_type': 'api-15-opt',
     'src_mozconfig': 'mobile/android/config/mozconfigs/android-api-15-frontend/nightly',
     'tooltool_manifest_src': 'mobile/android/config/tooltool-manifests/android-frontend/releng.manifest',
     'multi_locale_config_platform': 'android',
     'postflight_build_mach_commands': [
-        ['gradle', 'app:lintAutomationDebug'],
+        ['gradle',
+         'app:lintOfficialAustralisDebug',
+         'app:lintOfficialPhotonDebug',
+        ],
     ],
     'artifact_flag_build_variant_in_try': None, # There's no artifact equivalent.
 }
--- a/testing/mozharness/configs/builds/releng_sub_android_configs/64_test.py
+++ b/testing/mozharness/configs/builds/releng_sub_android_configs/64_test.py
@@ -1,12 +1,15 @@
 config = {
     'base_name': 'Android armv7 unit tests %(branch)s',
     'stage_platform': 'android-test',
     'build_type': 'api-15-opt',
     'src_mozconfig': 'mobile/android/config/mozconfigs/android-api-15-frontend/nightly',
     'tooltool_manifest_src': 'mobile/android/config/tooltool-manifests/android-frontend/releng.manifest',
     'multi_locale_config_platform': 'android',
     'postflight_build_mach_commands': [
-        ['gradle', 'app:testAutomationDebugUnitTest'],
+        ['gradle',
+         'app:testOfficialAustralisDebugUnitTest',
+         'app:testOfficialPhotonDebugUnitTest',
+        ],
     ],
     'artifact_flag_build_variant_in_try': None, # There's no artifact equivalent.
 }
--- a/toolkit/mozapps/installer/upload-files-APK.mk
+++ b/toolkit/mozapps/installer/upload-files-APK.mk
@@ -27,17 +27,17 @@ ifeq ($(MOZ_BUILD_APP),mobile/android)
 UPLOAD_EXTRA_FILES += robocop.apk
 
 # Robocop/Robotium tests, Android Background tests, and Fennec need to
 # be signed with the same key, which means release signing them all.
 
 ifndef MOZ_BUILD_MOBILE_ANDROID_WITH_GRADLE
 robocop_apk := $(topobjdir)/mobile/android/tests/browser/robocop/robocop-debug-unsigned-unaligned.apk
 else
-robocop_apk := $(topobjdir)/gradle/build/mobile/android/app/outputs/apk/app-automation-debug-androidTest-unaligned.apk
+robocop_apk := $(topobjdir)/gradle/build/mobile/android/app/outputs/apk/app-official-australis-debug-androidTest-unaligned.apk
 endif
 
 INNER_ROBOCOP_PACKAGE= \
   $(call RELEASE_SIGN_ANDROID_APK,$(robocop_apk),$(ABS_DIST)/robocop.apk)
 endif
 else
 INNER_ROBOCOP_PACKAGE=echo 'Testing is disabled - No Android Robocop for you'
 endif