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 268854 fe2090d75defeed0132976b20b2f9d31a9d073eb
parent 268853 3fa48c9d205bc6628b74caf93716338935b48689
child 268855 d8bf6eec26273b90f2a92c6d1e7a967ede086c2b
push id15804
push usernalexander@mozilla.com
push dateThu, 22 Oct 2015 02:21:45 +0000
treeherderfx-team@9b249dc7978b [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssebastian
bugs1123416
milestone44.0a1
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')