Bug 1924520 - Enable gradle configuration cache to improve build speed. r=firefox-build-system-reviewers,geckoview-reviewers,android-reviewers,webcompat-reviewers,nalexander,twisniewski,owlish,ohall,willdurand

Differential Revision: https://phabricator.services.mozilla.com/D232874
This commit is contained in:
Aaditya Dhingra
2025-03-03 14:03:48 +00:00
parent c2e6c46d83
commit 64ad68597e
9 changed files with 77 additions and 46 deletions

View File

@@ -210,23 +210,6 @@ allprojects {
buildDir "${topobjdir}/gradle/build"
// A stream that processes bytes line by line, prepending a tag before sending
// each line to Gradle's logging.
class TaggedLogOutputStream extends org.apache.commons.exec.LogOutputStream {
String tag
Logger logger
TaggedLogOutputStream(tag, logger) {
this.tag = tag
this.logger = logger
}
void processLine(String line, int level) {
logger.lifecycle("${this.tag} ${line}")
}
}
import org.gradle.api.services.BuildServiceParameters
abstract class MozconfigService implements BuildService<MozconfigService.Params>, AutoCloseable {
interface Params extends BuildServiceParameters {
@@ -376,9 +359,8 @@ task machBuildFaster(type: MachExec) {
args '-v'
}
// `path` is like `:machBuildFaster`.
standardOutput = new TaggedLogOutputStream("${path}>", logger)
errorOutput = standardOutput
standardOutput = System.out
errorOutput = System.err
}
task machStagePackage(type: MachExec) {
@@ -406,9 +388,8 @@ task machStagePackage(type: MachExec) {
// Force running `stage-package`.
outputs.upToDateWhen { false }
// `path` is like `:machStagePackage`.
standardOutput = new TaggedLogOutputStream("${path}>", logger)
errorOutput = standardOutput
standardOutput = System.out
errorOutput = System.err
}
afterEvaluate {