diff options
author | Alan Viverette <alanv@google.com> | 2018-08-01 14:51:02 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2018-08-01 14:51:02 +0000 |
commit | 13bcc713cd3350c228c034a7df94437893159d63 (patch) | |
tree | e1204783caebb3f6aae92ba7d67fbe0ea33fa22f /build.gradle | |
parent | e8de0c555fb64115edde66699675c5b328fc2c79 (diff) | |
parent | 41cf3fdb47ee40c267e11ca085ae4b45f84a7467 (diff) | |
download | multidex-13bcc713cd3350c228c034a7df94437893159d63.tar.gz |
Merge "Fix ub-multidex gradle build, add docs"
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. |