Merge "Add some javadoc."
[android/platform/tools/build.git] / build.gradle
1 // ext.androidHostOut is shared by all tools/{base,build,swt} gradle projects/
2 ext.androidHostOut = java.lang.System.getenv("ANDROID_HOST_OUT")
3 if (ext.androidHostOut == null) {
4   ext.androidHostOut = "$rootDir/../../out/host/common"
5 }
6 // rootProject.buildDir is specific to this gradle build.
7 buildDir = new File(file(ext.androidHostOut), "tools/build/build")
8
9 subprojects {
10     // Change buildDir first so that all plugins pick up the new value.
11     project.buildDir = project.file("$project.parent.buildDir/../$project.name")
12
13     apply plugin: 'idea'
14
15     repositories {
16         mavenCentral()
17         maven { url = uri("$rootProject.ext.androidHostOut/repo") }
18     }
19
20     project.ext {
21         baseVersion = '0.3'
22     }
23
24     task disableTestFailures << {
25         tasks.withType(Test) {
26             ignoreFailures = true
27         }
28     }
29
30     group = 'com.android.tools.build'
31 }
32
33 // delay evaluation of this project before all subprojects have been evaluated.
34 subprojects.each { subproject -> evaluationDependsOn(subproject.name) }
35
36 def testTasks = subprojects.collect { it.tasks.withType(Test) }.flatten()
37
38 task aggregateResults(type: Copy) {
39     from { testTasks*.testResultsDir }
40     into { file("$buildDir/results") }
41 }
42
43 task clean(type: Delete) {
44    delete '$buildDir'
45 }
46