TODOs: use Android SDK Manager for cmdline gradlew to work
Otherwise, ANDROID_HOME or sdk.dir will be considered missing and
gradle will fail.
Worse, gradle is now on 2.0.0 instead of 1.5.0, so the usual sdk
manager has to be obtained in a non-standard way.
Change-Id: Id46153c7b7ca80c462d7b9711a580c0745e93d47
diff --git a/app/build.gradle b/app/build.gradle
index a444f71..0b7fa60 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,8 +1,9 @@
+apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
- buildToolsVersion "23.0.2"
+ buildToolsVersion "23.0.1"
defaultConfig {
applicationId "io.v.todos"
diff --git a/build.gradle b/build.gradle
index 168f129..dd6ee1f 100644
--- a/build.gradle
+++ b/build.gradle
@@ -3,10 +3,17 @@
buildscript {
repositories {
jcenter()
+ maven { url "https://jitpack.io" }
}
dependencies {
classpath 'com.android.tools.build:gradle:2.0.0'
+ // Use the Android SDK manager, which will automatically download
+ // the required Android SDK.
+ // Note: Using jitpack and the master branch of the sdk-manager-plugin in order to be
+ // compatible with gradle 2.0.0. https://github.com/JakeWharton/sdk-manager-plugin/issues/99
+ classpath 'com.github.JakeWharton:sdk-manager-plugin:master'
+
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}