Use a single build tools version for frameworks/support.
Allows apps in the Android tree which depend on these libraries to use
a single build tools version in their own top-level gradle files.
For now the compile SDK is left alone. This means that projects must
still map both API 19 and API 21 full SDKs in their manifests.
Change-Id: I303438ec3f06af6e3a3c7ffcd554b730b1e07a0e
diff --git a/build.gradle b/build.gradle
index ae2f294..2f18675 100644
--- a/build.gradle
+++ b/build.gradle
@@ -12,6 +12,7 @@
ext.supportVersion = '19.2.0'
ext.extraVersion = 6
ext.supportRepoOut = ''
+ext.buildToolsVersion = '19.0.3'
/*
* With the build server you are given two env variables.
@@ -126,6 +127,12 @@
release.dependsOn rootProject.tasks.prepareRepo
// make the mainupload depend on this one.
mainUpload.dependsOn release
+
+ project.plugins.whenPluginAdded { plugin ->
+ if ("com.android.build.gradle.LibraryPlugin".equals(plugin.class.name)) {
+ project.android.buildToolsVersion = rootProject.buildToolsVersion
+ }
+ }
}
FileCollection getAndroidPrebuilt(String apiLevel) {