Update android test configuration

This commit is contained in:
Mikhael Bogdanov
2017-09-04 15:41:14 +02:00
parent 81a1bf3319
commit 71663afbfe
5 changed files with 18 additions and 11 deletions
@@ -3,9 +3,11 @@
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.2.3'
classpath 'com.android.tools.build:gradle:3.0.0-beta4'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
@@ -15,11 +17,12 @@ apply plugin: 'com.android.application'
repositories {
jcenter()
google()
}
android {
compileSdkVersion 19
buildToolsVersion "23.0.3"
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "org.jetbrains.kotlin.android.tests"
@@ -64,7 +67,7 @@ android {
dexOptions {
dexInProcess false
javaMaxHeapSize "300m"
javaMaxHeapSize "600m"
//default is 4 and Total Memory = maxProcessCount * javaMaxHeapSize
maxProcessCount 1
additionalParameters "--debug"
@@ -1,2 +1,4 @@
#don't try to download android specific tools within gradle: licence acceptance will be required
android.builder.sdkDownload=false
android.builder.sdkDownload=false
android.enableAapt2=false
android.enableD8=false
@@ -41,19 +41,19 @@ public class SDKDownloader {
//NOTE: PLATFORM_TOOLS 23.1.0 requires only 64 bit build agents
private static final String PLATFORM_TOOLS = "23.0.1";
private static final String SDK_TOOLS = "25.1.1";
public static final String BUILD_TOOLS = "23.0.3";
public static final String BUILD_TOOLS = "26.0.1";
private static final int ANDROID_VERSION = 19;
public static final String GRADLE_VERSION = "2.14.1";
public static final String GRADLE_VERSION = "4.1";
public SDKDownloader(PathManager pathManager) {
this.pathManager = pathManager;
platformZipPath = pathManager.getRootForDownload() + "/platforms.zip";
platformZipPath = pathManager.getRootForDownload() + "/platform" + ANDROID_VERSION + ".zip";
armImage = pathManager.getRootForDownload() + "/arm-image.zip";
x86Image = pathManager.getRootForDownload() + "/x86-image.zip";
platformToolsZipPath = pathManager.getRootForDownload() + "/platform-tools.zip";
skdToolsZipPath = pathManager.getRootForDownload() + "/tools.zip";
buildToolsZipPath = pathManager.getRootForDownload() + "/build-tools.zip";
platformToolsZipPath = pathManager.getRootForDownload() + "/platform-tools" + PLATFORM_TOOLS + ".zip";
skdToolsZipPath = pathManager.getRootForDownload() + "/tools" + SDK_TOOLS + ".zip";
buildToolsZipPath = pathManager.getRootForDownload() + "/build-tools" + BUILD_TOOLS + ".zip";
gradleZipPath = pathManager.getRootForDownload() + "/gradle" + GRADLE_VERSION + ".zip";
}
@@ -127,7 +127,7 @@ public class SDKDownloader {
String buildToolsFolder = buildTools + BUILD_TOOLS + "/";
new File(buildToolsFolder).delete();
unzip(buildToolsZipPath, buildTools);
new File(buildTools + "/android-6.0").renameTo(new File(buildToolsFolder));
new File(buildTools + "/android-8.0.0").renameTo(new File(buildToolsFolder));
}
public void deleteAll() {
@@ -33,6 +33,7 @@ public class GradleRunner {
listOfCommands = new ArrayList<>();
String cmdName = SystemInfo.isWindows ? "gradle.bat" : "gradle";
listOfCommands.add(pathManager.getGradleBinFolder() + "/" + cmdName);
listOfCommands.add("--no-daemon");
listOfCommands.add("--build-file");
listOfCommands.add(pathManager.getTmpFolder() + "/build.gradle");
}
@@ -122,6 +122,7 @@ public class SpecialFiles {
// KT-8120
excludedFiles.add("closureOfInnerLocalClass.kt");
excludedFiles.add("closureWithSelfInstantiation.kt");
excludedFiles.add("quotedClassName.kt");
}
private SpecialFiles() {