| buildscript { |
| repositories { |
| maven { url "$rootDir/../../prebuilts/tools/common/gradle-plugins/repository" } |
| } |
| dependencies { |
| classpath 'com.android.tools.internal:internal-plugins:1.0' |
| } |
| } |
| |
| apply plugin: 'clone-artifacts' |
| apply plugin: 'distrib' |
| |
| // artifact cloning destinations |
| cloneArtifacts { |
| mainRepo = "$rootDir/../../prebuilts/tools/common/m2/repository" |
| secondaryRepo = "$rootDir/../../prebuilts/tools/common/m2/internal" |
| } |
| |
| // set up the distribution destination |
| distribution { |
| destinationPath = "$rootDir/../../prebuilts/devtools" |
| dependenciesRepo = cloneArtifacts.mainRepo |
| } |
| |
| // 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/base/build") |
| |
| ext.localRepo = project.hasProperty('localRepo') ? localRepo : "$ext.androidHostOut/repo" |
| |
| project.ext.baseVersion = '22.4.0' |
| project.ext.buildVersion = '0.7.0' |
| |
| subprojects { Project project -> |
| // Change buildDir first so that all plugins pick up the new value. |
| project.buildDir = project.file("$project.parent.buildDir/../$project.name") |
| |
| apply plugin: 'clone-artifacts' |
| |
| repositories { |
| maven { url = uri(rootProject.cloneArtifacts.mainRepo) } |
| maven { url = uri(rootProject.cloneArtifacts.secondaryRepo) } |
| } |
| |
| apply from: "$project.rootDir/base.gradle" |
| } |
| |
| // delay evaluation of this project before all subprojects have been evaluated. |
| subprojects.each { subproject -> evaluationDependsOn(subproject.path) } |
| |
| def testTasks = subprojects.collect { it.tasks.withType(Test) }.flatten() |
| |
| task aggregateResults(type: Copy) { |
| from { testTasks*.testResultsDir } |
| into { file("$buildDir/results") } |
| } |
| |
| task prepareRepo(type: Copy) { |
| from { rootProject.cloneArtifacts.mainRepo } |
| from { rootProject.cloneArtifacts.secondaryRepo } |
| into { "$rootProject.ext.androidHostOut/repo" } |
| } |