Android codegen tests: fix android SDK path in local.properties
The path should have slashes instead of backslashes even on Windows.
This commit is contained in:
@@ -19,6 +19,7 @@ package org.jetbrains.kotlin.android.tests;
|
|||||||
import com.google.common.io.Files;
|
import com.google.common.io.Files;
|
||||||
import com.intellij.openapi.util.io.FileUtil;
|
import com.intellij.openapi.util.io.FileUtil;
|
||||||
import junit.framework.TestSuite;
|
import junit.framework.TestSuite;
|
||||||
|
import kotlin.io.FilesKt;
|
||||||
import org.jetbrains.annotations.NotNull;
|
import org.jetbrains.annotations.NotNull;
|
||||||
import org.junit.runner.RunWith;
|
import org.junit.runner.RunWith;
|
||||||
import org.junit.runners.AllTests;
|
import org.junit.runners.AllTests;
|
||||||
@@ -65,10 +66,11 @@ public class AndroidRunner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static void writeAndroidSkdToLocalProperties() throws IOException {
|
private static void writeAndroidSkdToLocalProperties() throws IOException {
|
||||||
System.out.println("Writing android sdk to local.properties: " + pathManager.getAndroidSdkRoot());
|
String sdkRoot = FilesKt.getInvariantSeparatorsPath(new File(pathManager.getAndroidSdkRoot()));
|
||||||
|
System.out.println("Writing android sdk to local.properties: " + sdkRoot);
|
||||||
File file = new File(pathManager.getTmpFolder() + "/local.properties");
|
File file = new File(pathManager.getTmpFolder() + "/local.properties");
|
||||||
try (FileWriter fw = new FileWriter(file)) {
|
try (FileWriter fw = new FileWriter(file)) {
|
||||||
fw.write("sdk.dir=" + pathManager.getAndroidSdkRoot());
|
fw.write("sdk.dir=" + sdkRoot);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user