1 buildscript { 2 repositories { 3 maven { url '../../prebuilts/gradle-plugin' } 4 maven { url '../../prebuilts/tools/common/m2/repository' } 5 maven { url '../../prebuilts/tools/common/m2/internal' } 6 } 7 dependencies { 8 classpath 'com.android.tools.build:gradle:0.5.7' 9 } 10 } 11 12 ext.version = '18.0.1' 13 14 // ext.androidHostOut is shared by all tools/{base,build,swt} gradle projects/ 15 ext.androidHostOut = file("$rootDir/../../out") 16 17 // rootProject.buildDir is specific to this gradle build. 18 buildDir = new File(ext.androidHostOut, "host/gradle/frameworks/support/build") 19 20 ext.androidRepoOut = new File(ext.androidHostOut, "host/support_repo/") 21 22 task release(type: Copy) { 23 from "$rootDir/../../prebuilts/maven_repo/android" 24 into project.ext.androidRepoOut 25 } 26 27 subprojects { 28 // Change buildDir first so that all plugins pick up the new value. 29 project.buildDir = project.file("$project.parent.buildDir/../$project.name") 30 31 apply plugin: 'maven' 32 33 version = rootProject.ext.version 34 group = 'com.android.support' 35 36 task release(type: Upload) { 37 configuration = configurations.archives 38 repositories { 39 mavenDeployer { 40 repository(url: uri("$rootProject.ext.androidRepoOut")) 41 } 42 } 43 } 44 release.dependsOn rootProject.tasks.release 45 } 46 47 FileCollection getAndroidPrebuilt(String apiLevel) { 48 files("$rootDir/../../prebuilts/sdk/$apiLevel/android.jar") 49 } 50