зеркало из https://github.com/mozilla/gecko-dev.git
47 строки
1.3 KiB
Groovy
47 строки
1.3 KiB
Groovy
allprojects {
|
|
// Expose the per-object-directory configuration to all projects.
|
|
ext {
|
|
mozconfig = gradle.mozconfig
|
|
topsrcdir = gradle.mozconfig.topsrcdir
|
|
topobjdir = gradle.mozconfig.topobjdir
|
|
}
|
|
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
}
|
|
|
|
buildDir "${topobjdir}/mobile/android/gradle/build"
|
|
|
|
buildscript {
|
|
repositories {
|
|
jcenter()
|
|
}
|
|
|
|
dependencies {
|
|
// IntelliJ 14.0.2 wants 0.14.4; IntelliJ 14.0.3 and Android Studio want
|
|
// 1.0.0. There are major issues with the combination of 0.14.4, Gradle
|
|
// 2.2.1, and IntelliJ 14.0.2: see Bug 1120032.
|
|
classpath 'com.android.tools.build:gradle:1.0.0'
|
|
}
|
|
}
|
|
|
|
task generateCodeAndResources(type:Exec) {
|
|
workingDir "${topobjdir}"
|
|
|
|
commandLine mozconfig.substs.GMAKE
|
|
args '-C'
|
|
args "${topobjdir}/mobile/android/base"
|
|
args 'gradle-targets'
|
|
|
|
// 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()}")
|
|
}
|
|
}
|
|
}
|