Use android-sdk-manager plugin to automate downloading Android SDK components.

This commit is contained in:
AlexanderR 2015-03-29 23:18:42 +10:00
parent fa7d39b94a
commit 961760991d

View File

@ -1,10 +1,17 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
task wrapper (type:Wrapper) {
gradleVersion = '2.2.1'
distributionUrl = 'https://services.gradle.org/distributions/gradle-2.2.1-all.zip'
}
buildscript {
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
classpath 'com.jakewharton.sdkmanager:gradle-plugin:0.12.0'
}
}
@ -13,3 +20,12 @@ allprojects {
jcenter()
}
}
subprojects {
def androidHome
if ((androidHome = System.env.'ANDROID_HOME')
&& (androidHome = androidHome as File).exists()
&& androidHome.canWrite())
apply plugin: 'android-sdk-manager'
}