diff options
author | Alan Viverette <alanv@google.com> | 2018-07-18 13:50:21 -0400 |
---|---|---|
committer | Alan Viverette <alanv@google.com> | 2018-07-20 17:47:24 -0400 |
commit | 41cf3fdb47ee40c267e11ca085ae4b45f84a7467 (patch) | |
tree | b347c5bb31fd3611b5bc6b4726fd1e8ecca01b14 /build.gradle | |
parent | ffb75bf5926eac9b68671e75c157375ffb72dc86 (diff) | |
download | multidex-41cf3fdb47ee40c267e11ca085ae4b45f84a7467.tar.gz |
Fix ub-multidex gradle build, add docs
Bug: 63945424
Test: ./gradlew dist
Change-Id: Ib2e7ab6a02aa8944a1ebd4ac20636c90c95543ab
Diffstat (limited to 'build.gradle')
-rw-r--r-- | build.gradle | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/build.gradle b/build.gradle index c30a000..45d505b 100644 --- a/build.gradle +++ b/build.gradle @@ -19,34 +19,28 @@ import org.gradle.internal.os.OperatingSystem buildscript { repositories { maven { url '../../prebuilts/gradle-plugin' } - maven { url '../../prebuilts/tools/common/m2/repository' } - maven { url '../../prebuilts/tools/common/m2/internal' } } dependencies { - classpath 'com.android.tools.build:gradle:2.3.0' + classpath 'com.android.tools.build:gradle:3.0.1' } } apply from: 'version.gradle' -final String platform = OperatingSystem.current().isMacOsX() ? 'darwin' : 'linux' -System.setProperty('android.dir', "${rootDir}/../../") -final String fullSdkPath = "${rootDir}/../../prebuilts/fullsdk-${platform}" -if (file(fullSdkPath).exists()) { - gradle.ext.currentSdk = 26 - ext.buildToolsVersion = '26.0.0' - project.ext.androidJar = files("${fullSdkPath}/platforms/android-${gradle.currentSdk}/android.jar") - System.setProperty('android.home', "${rootDir}/../../prebuilts/fullsdk-${platform}") - File props = file("local.properties") - props.write "sdk.dir=${fullSdkPath}" -} else { - gradle.ext.currentSdk = 'current' - ext.buildToolsVersion = '26.0.0' - project.ext.androidJar = files("${project.rootDir}/../../prebuilts/sdk/current/public/android.jar") - File props = file("local.properties") - props.write "android.dir=../../" +String platform = OperatingSystem.current().isMacOsX() ? 'darwin' : 'linux' +File fullSdkPath = file("${rootDir}/../../prebuilts/fullsdk-${platform}") +if (!fullSdkPath.exists()) { + throw GradleException("missing fullsdk") } +gradle.ext.currentSdk = 28 +ext.buildToolsVersion = '27.0.3' +project.ext.fullSdkPath = fullSdkPath +project.ext.androidJar = files("${fullSdkPath}/platforms/android-${gradle.currentSdk}/android.jar") + +File props = file("local.properties") +props.write "sdk.dir=${fullSdkPath.getAbsolutePath()}" + /* * 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. |