Merge "Move version to 22."
[android/platform/tools/build.git] / build.gradle
index 209d103..0adb6cd 100644 (file)
@@ -1,13 +1,35 @@
+// 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("$rootDir/../base/repo") }
+        maven { url = uri("$rootProject.ext.androidHostOut/repo") }
     }
 
     project.ext {
-        baseVersion = '0.3'
+        baseVersion = '0.4'
+    }
+
+    task disableTestFailures << {
+        tasks.withType(Test) {
+            ignoreFailures = true
+        }
+    }
+
+    findbugs {
+        ignoreFailures = true
+        effort = "max"
+        reportLevel = "high"
     }
 
     group = 'com.android.tools.build'
@@ -20,20 +42,10 @@ def testTasks = subprojects.collect { it.tasks.withType(Test) }.flatten()
 
 task aggregateResults(type: Copy) {
     from { testTasks*.testResultsDir }
-    into { file("build/results") }
-}
-aggregateResults.dependsOn testTasks
-
-task makeAggregateReport(dependsOn: aggregateResults) {
-    def report = new org.gradle.api.internal.tasks.testing.junit.report.DefaultTestReport(testReportDir: file("build/reports/tests"), testResultsDir: file("build/results"))
-    report.generateReport()
+    into { file("$buildDir/results") }
 }
 
-task check {
-    //nothing
+task clean(type: Delete) {
+   delete '$buildDir'
 }
-check.dependsOn makeAggregateReport
 
-task clean(type: Delete) {
-   delete 'build'
-}
\ No newline at end of file