Bug 1572859 - Package more aggressively when building GeckoView (and Fennec) within Gradle. r=agi
authorNick Alexander <nalexander@mozilla.com>
Wed, 14 Aug 2019 20:38:42 +0000
changeset 488125 4c1bdf45201ae5fce0b87225c46a6ae5f7c6034a
parent 488124 05b192f3ba82425d42ab63510b224a90334e5ca9
child 488126 c02aa182735b12c584d7e9eff3a366d6e28c73e3
push id113900
push usercbrindusan@mozilla.com
push dateThu, 15 Aug 2019 09:53:50 +0000
treeherdermozilla-inbound@0db07ff50ab5 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersagi
bugs1572859
milestone70.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 1572859 - Package more aggressively when building GeckoView (and Fennec) within Gradle. r=agi This always invokes `mach package` (in reality `make -C ... stage-package` for historical reasons), sacrificing a few seconds of package-related time every Gradle build. We then rely on Gradle's fingerprinting to know when AAR/APK targets are up to date. This should be much better for GeckoView engineers: the old input file computations were simplifications tuned for Fennec engineers consuming artifact builds. Differential Revision: https://phabricator.services.mozilla.com/D41447
build.gradle
--- a/build.gradle
+++ b/build.gradle
@@ -204,38 +204,31 @@ task machBuildFaster(type: MachExec) {
 }
 
 def createMachStagePackageTask(name) {
     return task(name, type: MachExec) {
         onlyIf rootProject.ext.geckoBinariesOnlyIf
 
         dependsOn rootProject.machBuildFaster
 
-        // We'd prefer to take these from the :omnijar project directly, but
-        // it's awkward to reach across projects at evaluation time, so we
-        // duplicate the list here.
-        inputs.dir "${topsrcdir}/mobile/android/chrome"
-        inputs.dir "${topsrcdir}/mobile/android/components"
-        inputs.dir "${topsrcdir}/mobile/android/locales"
-        inputs.dir "${topsrcdir}/mobile/android/modules"
-        inputs.dir "${topsrcdir}/mobile/android/themes"
-        inputs.dir "${topsrcdir}/toolkit"
-
         workingDir "${topobjdir}"
 
         // We'd prefer this to be a `mach` invocation, but `mach build
         // mobile/android/installer/stage-package` doesn't work as expected.
         commandLine mozconfig.substs.GMAKE
         args '-C'
         args "${topobjdir}/mobile/android/installer"
         args 'stage-package'
 
         outputs.file "${topobjdir}/dist/fennec/assets/${mozconfig.substs.ANDROID_CPU_ARCH}/libxul.so"
         outputs.file "${topobjdir}/dist/fennec/lib/${mozconfig.substs.ANDROID_CPU_ARCH}/libmozglue.so"
 
+        // Force running `stage-package`.
+        outputs.upToDateWhen { false }
+
         // `path` is like `:machStagePackage`.
         standardOutput = new TaggedLogOutputStream("${path}>", logger)
         errorOutput = standardOutput
     }
 }
 
 createMachStagePackageTask("machStagePackageForFennec").with {
     outputs.file "${topobjdir}/dist/fennec/assets/omni.ja"