blob: 1a508ab06dc62f736b95bdedb17fa3ad06b0eba5 [file] [log] [blame]
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -08001buildscript {
2 repositories {
3 maven { url '../../prebuilts/gradle-plugin' }
Xavier Ducrohet855a9222014-01-02 19:00:43 -08004 mavenCentral()
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -08005 maven { url '../../prebuilts/tools/common/m2/repository' }
6 maven { url '../../prebuilts/tools/common/m2/internal' }
7 }
8 dependencies {
Xavier Ducrohet855a9222014-01-02 19:00:43 -08009 classpath 'com.android.tools.build:gradle:0.7.0'
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080010 }
11}
12
Xavier Ducrohet855a9222014-01-02 19:00:43 -080013ext.supportVersion = '19.0.1'
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080014
15// ext.androidHostOut is shared by all tools/{base,build,swt} gradle projects/
16ext.androidHostOut = file("$rootDir/../../out")
17
18// rootProject.buildDir is specific to this gradle build.
19buildDir = new File(ext.androidHostOut, "host/gradle/frameworks/support/build")
20
Xavier Ducrohet855a9222014-01-02 19:00:43 -080021ext.supportRepoOut = new File(ext.androidHostOut, "host/support_repo/")
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080022
23task release(type: Copy) {
24 from "$rootDir/../../prebuilts/maven_repo/android"
Xavier Ducrohet855a9222014-01-02 19:00:43 -080025 into project.ext.supportRepoOut
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080026}
27
28subprojects {
29 // Change buildDir first so that all plugins pick up the new value.
Xavier Ducrohet616b95d2014-02-12 09:09:43 -080030 project.buildDir = project.file("$project.parent.buildDir/../$project.name/build")
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080031
32 apply plugin: 'maven'
33
Xavier Ducrohet855a9222014-01-02 19:00:43 -080034 version = rootProject.ext.supportVersion
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080035 group = 'com.android.support'
36
37 task release(type: Upload) {
38 configuration = configurations.archives
39 repositories {
40 mavenDeployer {
Xavier Ducrohet855a9222014-01-02 19:00:43 -080041 repository(url: uri("$rootProject.ext.supportRepoOut"))
Xavier Ducrohet86fb8ef2013-02-22 15:04:37 -080042 }
43 }
44 }
45 release.dependsOn rootProject.tasks.release
46}
47
48FileCollection getAndroidPrebuilt(String apiLevel) {
49 files("$rootDir/../../prebuilts/sdk/$apiLevel/android.jar")
50}
Xavier Ducrohet855a9222014-01-02 19:00:43 -080051