java: Use SDK Manager in HLAPI and Dice Roller for Jenkins
Jenkins doesn't really have an ANDROID_HOME, so like all the other
Java tests, we need to use the SDK manager package to handle
compilation and tests.
Change-Id: I13b21f1606603f33ff32c4c27169c67808e8c637
diff --git a/projects/dice_roller/app/build.gradle b/projects/dice_roller/app/build.gradle
index 14af5bd..3a2029b 100644
--- a/projects/dice_roller/app/build.gradle
+++ b/projects/dice_roller/app/build.gradle
@@ -1,3 +1,4 @@
+apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.application'
android {
diff --git a/projects/dice_roller/build.gradle b/projects/dice_roller/build.gradle
index b6084db..f8bd3db 100644
--- a/projects/dice_roller/build.gradle
+++ b/projects/dice_roller/build.gradle
@@ -2,12 +2,18 @@
buildscript {
repositories {
- mavenLocal()
+ maven { url "https://jitpack.io" }
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.1.2'
+ // 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
}
diff --git a/syncbase/build.gradle b/syncbase/build.gradle
index 487b0df..484f3bd 100644
--- a/syncbase/build.gradle
+++ b/syncbase/build.gradle
@@ -1,12 +1,19 @@
buildscript {
repositories {
+ maven { url "https://jitpack.io" }
jcenter()
}
dependencies {
classpath (
'com.android.tools.build:gradle:2.1.0',
'com.github.dcendents:android-maven-gradle-plugin:1.3',
- 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6'
+ 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.6',
+
+ // 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
+ 'com.github.JakeWharton:sdk-manager-plugin:master'
)
}
}
@@ -26,6 +33,7 @@
def gitUrl = 'https://github.com/vanadium/java.git'
def pkgDesc = 'Offline-capable storage system with secure peer-to-peer data synchronization'
+apply plugin: 'android-sdk-manager'
apply plugin: 'com.android.library'
apply plugin: 'com.github.dcendents.android-maven'
apply plugin: 'com.jfrog.bintray'