Replace android sdk dependencies with custom project build, cleanup update_dependencies.xml

This commit is contained in:
Ilya Chernikov
2017-11-15 18:50:21 +01:00
committed by Vyacheslav Gerasimov
parent 98204aa2d3
commit 0b63e11ea8
19 changed files with 184 additions and 222 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ dependencies {
testCompile(projectTests(":compiler:tests-common-jvm6"))
testCompileOnly(project(":kotlin-reflect-api"))
testCompile(commonDep("junit:junit"))
testCompile(preloadedDeps("dx", subdir = "android-5.0/lib"))
testCompile(project(":custom-dependencies:android-sdk", configuration = "dxJar"))
}
afterEvaluate {
@@ -366,7 +366,27 @@ public class KotlinTestUtils {
}
public static File findAndroidApiJar() {
return new File(getHomeDirectory(), "dependencies/android.jar");
String androidJarProp = System.getProperty("android.jar");
File androidJarFile = androidJarProp == null ? null : new File(androidJarProp);
if (androidJarFile == null || !androidJarFile.isFile()) {
throw new RuntimeException(
"Unable to get a valid path from 'android.jar' property (" +
androidJarProp +
"), please point it to the 'android.jar' file location");
}
return androidJarFile;
}
public static File findAndroidSdk() {
String androidSdkProp = System.getProperty("android.sdk");
File androidSdkDir = androidSdkProp == null ? null : new File(androidSdkProp);
if (androidSdkDir == null || !androidSdkDir.isDirectory()) {
throw new RuntimeException(
"Unable to get a valid path from 'android.sdk' property (" +
androidSdkProp +
"), please point it to the android SDK location");
}
return androidSdkDir;
}
public static File getAnnotationsJar() {