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