Bug 1490435 [wpt PR 12951] - Mark more Windows failures as xfail, a=testonly
[gecko.git] / settings.gradle
blob5c4996b73a0d257d14a6fa67cb2497b553b83911
1 // You might think topsrcdir is '.', but that's not true when the Gradle build
2 // is launched from within IntelliJ.
3 def topsrcdir = rootProject.projectDir.absolutePath
5 def commandLine = ["${topsrcdir}/mach", "environment", "--format", "json", "--verbose"]
6 def proc = commandLine.execute(null, new File(topsrcdir))
7 def standardOutput = new ByteArrayOutputStream()
8 proc.consumeProcessOutput(standardOutput, standardOutput)
9 proc.waitFor()
11 // Only show the output if something went wrong.
12 if (proc.exitValue() != 0) {
13     throw new GradleException("Process '${commandLine}' finished with non-zero exit value ${proc.exitValue()}:\n\n${standardOutput.toString()}")
16 import groovy.json.JsonSlurper
18 def slurper = new JsonSlurper()
19 def json = slurper.parseText(standardOutput.toString())
21 if (json.substs.MOZ_BUILD_APP != 'mobile/android') {
22     throw new GradleException("Building with Gradle is only supported for Fennec, i.e., MOZ_BUILD_APP == 'mobile/android'.")
25 // Set the Android SDK location.  This is the *least specific* mechanism, which
26 // is unfortunate: we'd prefer to use the *most specific* mechanism.  That is,
27 // local.properties (first 'sdk.dir', then 'android.dir') and then the
28 // environment variable ANDROID_HOME will override this.  That's unfortunate,
29 // but it's hard to automatically arrange better.
30 System.setProperty('android.home', json.substs.ANDROID_SDK_ROOT)
32 include ':annotations'
33 include ':app'
34 include ':geckoview'
35 include ':geckoview_example'
36 include ':omnijar'
37 include ':thirdparty'
39 project(':annotations').projectDir = new File("${json.topsrcdir}/mobile/android/annotations")
40 project(':app').projectDir = new File("${json.topsrcdir}/mobile/android/app")
41 project(':geckoview').projectDir = new File("${json.topsrcdir}/mobile/android/geckoview")
42 project(':geckoview_example').projectDir = new File("${json.topsrcdir}/mobile/android/geckoview_example")
43 project(':omnijar').projectDir = new File("${json.topsrcdir}/mobile/android/app/omnijar")
44 project(':thirdparty').projectDir = new File("${json.topsrcdir}/mobile/android/thirdparty")
46 // The Gradle instance is shared between settings.gradle and all the
47 // other build.gradle files (see
48 // http://forums.gradle.org/gradle/topics/define_extension_properties_from_settings_xml).
49 // We use this ext property to pass the per-object-directory mozconfig
50 // between scripts.  This lets us execute set-up code before we gradle
51 // tries to configure the project even once, and as a side benefit
52 // saves invoking |mach environment| multiple times.
53 gradle.ext.mozconfig = json