Merge "Move version to 22."
[android/platform/tools/build.git] / build.gradle
index 5851637..0adb6cd 100644 (file)
@@ -1,9 +1,51 @@
-allprojects {
+// ext.androidHostOut is shared by all tools/{base,build,swt} gradle projects/
+ext.androidHostOut = file("$rootDir/../../out/host/gradle")
+ext.androidRootDir = file(new File(ext.androidHostOut, "../../../"))
+// rootProject.buildDir is specific to this gradle build.
+buildDir = new File(file(ext.androidHostOut), "tools/build/build")
+
+subprojects {
+    // Change buildDir first so that all plugins pick up the new value.
+    project.buildDir = project.file("$project.parent.buildDir/../$project.name")
+
     apply plugin: 'idea'
+    apply plugin: 'findbugs'
 
     repositories {
         mavenCentral()
+        maven { url = uri("$rootProject.ext.androidHostOut/repo") }
+    }
+
+    project.ext {
+        baseVersion = '0.4'
+    }
+
+    task disableTestFailures << {
+        tasks.withType(Test) {
+            ignoreFailures = true
+        }
+    }
+
+    findbugs {
+        ignoreFailures = true
+        effort = "max"
+        reportLevel = "high"
     }
 
-    version = '0.1-SNAPSHOT'
+    group = 'com.android.tools.build'
 }
+
+// delay evaluation of this project before all subprojects have been evaluated.
+subprojects.each { subproject -> evaluationDependsOn(subproject.name) }
+
+def testTasks = subprojects.collect { it.tasks.withType(Test) }.flatten()
+
+task aggregateResults(type: Copy) {
+    from { testTasks*.testResultsDir }
+    into { file("$buildDir/results") }
+}
+
+task clean(type: Delete) {
+   delete '$buildDir'
+}
+