Bug 1123416 - Part 2: Restrict $topsrcdir/build.gradle to Fennec. r=sebastian
authorNick Alexander <nalexander@mozilla.com>
Tue, 20 Oct 2015 10:32:26 -0700
changeset 268878 fe2090d75defeed0132976b20b2f9d31a9d073eb
parent 268877 3fa48c9d205bc6628b74caf93716338935b48689
child 268879 d8bf6eec26273b90f2a92c6d1e7a967ede086c2b
push id29565
push usercbook@mozilla.com
push dateThu, 22 Oct 2015 09:41:55 +0000
treeherdermozilla-central@00ee97fb1a6c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1123416
milestone44.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 1123416 - Part 2: Restrict $topsrcdir/build.gradle to Fennec. r=sebastian
settings.gradle
--- a/settings.gradle
+++ b/settings.gradle
@@ -12,16 +12,20 @@ proc.waitFor()
 if (proc.exitValue() != 0) {
     throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${proc.exitValue()}:\n\n${standardOutput.toString()}")
 }
 
 import groovy.json.JsonSlurper
 def slurper = new JsonSlurper()
 def json = slurper.parseText(standardOutput.toString())
 
+if (json.substs.MOZ_BUILD_APP != 'mobile/android') {
+    throw new GradleException("Building with Gradle is only supported for Fennec, i.e., MOZ_BUILD_APP == 'mobile/android'.");
+}
+
 include ':app'
 include ':base'
 include ':omnijar'
 include ':thirdparty'
 
 def gradleRoot = new File("${json.topobjdir}/mobile/android/gradle")
 project(':app').projectDir = new File(gradleRoot, 'app')
 project(':base').projectDir = new File(gradleRoot, 'base')