mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-06 17:16:12 +00:00
711f72faeb
This is just a clean-up: rather than having each subproject have a generateCodeAndResources build action, we have a single action (attached to the root project) which all subprojects depend on. Gradle orders the task DAG accordingly, saving process invocations and speeding up the build. --HG-- extra : source : b44dc79fbddb1acc02da12e9926852e67d606584 extra : amend_source : b89249d8af2b7986ab1174f89c150ef8115c71cf
43 lines
1.1 KiB
Groovy
43 lines
1.1 KiB
Groovy
apply plugin: 'java'
|
|
|
|
/**
|
|
* This task runs when any input file is newer than the omnijar.
|
|
*/
|
|
task buildOmnijar(type:Exec) {
|
|
dependsOn rootProject.generateCodeAndResources
|
|
|
|
// Depend on all the Gecko resources.
|
|
inputs.sourceDir 'src/main/java/locales'
|
|
inputs.sourceDir 'src/main/java/chrome'
|
|
inputs.sourceDir 'src/main/java/components'
|
|
inputs.sourceDir 'src/main/java/modules'
|
|
inputs.sourceDir 'src/main/java/themes'
|
|
|
|
// Produce a single output file.
|
|
outputs.file "${topobjdir}/dist/fennec/assets/omni.ja"
|
|
|
|
workingDir "${topobjdir}"
|
|
|
|
commandLine mozconfig.substs.GMAKE
|
|
args '-C'
|
|
args "${topobjdir}/mobile/android/base"
|
|
args 'gradle-omnijar'
|
|
|
|
// Only show the output if something went wrong.
|
|
ignoreExitValue = true
|
|
standardOutput = new ByteArrayOutputStream()
|
|
errorOutput = standardOutput
|
|
doLast {
|
|
if (execResult.exitValue != 0) {
|
|
throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${execResult.exitValue}:\n\n${standardOutput.toString()}")
|
|
}
|
|
}
|
|
}
|
|
|
|
apply plugin: 'idea'
|
|
|
|
idea {
|
|
module {
|
|
}
|
|
}
|