DO NOT MERGE. Move to using prebuilts/fullsdk instead of prebuilts/sdk
Relanding this since ag/1642243 has landed.
Change-Id: I200a0b26b2e0cefbfbc7512c02f7755c516b4c38
Test: compiles both from terminal using gradlew and from android studio
diff --git a/build.gradle b/build.gradle
index 845c801..b67729e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -1,6 +1,7 @@
import android.support.doclava.DoclavaMultilineJavadocOptionFileOption
import com.android.build.gradle.internal.coverage.JacocoReportTask
import com.android.build.gradle.internal.tasks.DeviceProviderInstrumentTestTask
+import org.gradle.internal.os.OperatingSystem
import android.support.checkapi.CheckApiTask
import android.support.checkapi.UpdateApiTask
@@ -31,7 +32,7 @@
doclava project(':doclava')
}
-gradle.ext.currentSdk = 'current'
+gradle.ext.currentSdk = 25
ext.supportVersion = '25.1.0-SNAPSHOT'
ext.extraVersion = 40
ext.supportRepoOut = ''
@@ -45,6 +46,11 @@
// required for the doclava dependency.
ext.usePrebuilts = "true"
+// Use the embedded SDK by default, which can be overridden by setting the 'sdk.dir' property
+// (e.g. local.properties) or the 'ANDROID_HOME' environment variable.
+final String platform = OperatingSystem.current().isMacOsX() ? 'darwin' : 'linux'
+System.setProperty('android.home', "${rootDir}/../../prebuilts/fullsdk-${platform}")
+
/*
* With the build server you are given two env variables.
* The OUT_DIR is a temporary directory you can use to put things during the build.