blob: d284b326d0497d868bfebe1ecbab7613f9200ad4 [file] [log] [blame]
Raphael Molle8ecf472013-01-08 15:16:12 -08001// ext.androidHostOut is shared by all tools/{base,build,swt} gradle projects/
Raphael Moll1ff00592013-02-12 10:13:12 -08002ext.androidHostOut = file("$rootDir/../../out/host/gradle")
3ext.androidRootDir = file(new File(ext.androidHostOut, "../../../"))
Raphael Molle8ecf472013-01-08 15:16:12 -08004// rootProject.buildDir is specific to this gradle build.
5buildDir = new File(file(ext.androidHostOut), "tools/build/build")
6
Xavier Ducrohet86fe6552012-12-10 14:59:50 -08007subprojects {
Raphael Molle8ecf472013-01-08 15:16:12 -08008 // Change buildDir first so that all plugins pick up the new value.
9 project.buildDir = project.file("$project.parent.buildDir/../$project.name")
10
Xavier Ducrohet08a1fdb2012-08-28 19:09:17 -070011 apply plugin: 'idea'
Xavier Ducrohet25879d32013-02-06 15:29:05 -080012 apply plugin: 'findbugs'
Xavier Ducrohet08a1fdb2012-08-28 19:09:17 -070013
Xavier Ducrohet54154802012-08-30 15:41:10 -070014 repositories {
15 mavenCentral()
Raphael Molle8ecf472013-01-08 15:16:12 -080016 maven { url = uri("$rootProject.ext.androidHostOut/repo") }
Xavier Ducrohet54154802012-08-30 15:41:10 -070017 }
18
Xavier Ducrohet124edda2012-09-26 18:28:21 -070019 project.ext {
Xavier Ducrohet3fe7c572012-10-09 12:12:41 -070020 baseVersion = '0.3'
Xavier Ducrohet124edda2012-09-26 18:28:21 -070021 }
22
Xavier Ducrohet82a108d2013-01-15 10:54:19 -080023 task disableTestFailures << {
24 tasks.withType(Test) {
25 ignoreFailures = true
26 }
27 }
28
Xavier Ducrohetecfdf722013-02-06 16:45:34 -080029 findbugs {
Xavier Ducrohet25879d32013-02-06 15:29:05 -080030 ignoreFailures = true
31 effort = "max"
32 reportLevel = "high"
33 }
34
Xavier Ducrohet124edda2012-09-26 18:28:21 -070035 group = 'com.android.tools.build'
Xavier Ducrohet08a1fdb2012-08-28 19:09:17 -070036}
Xavier Ducrohet7d37b2d2012-12-10 15:20:31 -080037
Xavier Ducrohet86fe6552012-12-10 14:59:50 -080038// delay evaluation of this project before all subprojects have been evaluated.
39subprojects.each { subproject -> evaluationDependsOn(subproject.name) }
40
41def testTasks = subprojects.collect { it.tasks.withType(Test) }.flatten()
42
43task aggregateResults(type: Copy) {
44 from { testTasks*.testResultsDir }
Raphael Molle8ecf472013-01-08 15:16:12 -080045 into { file("$buildDir/results") }
Xavier Ducrohet7d37b2d2012-12-10 15:20:31 -080046}
Xavier Ducrohet71900c12012-12-20 16:34:59 -080047
48task clean(type: Delete) {
Xavier Ducrohet3262b4c2013-01-14 18:10:04 -080049 delete '$buildDir'
Raphael Molle8ecf472013-01-08 15:16:12 -080050}
51