Allow to avoid rebuilding application in debugger tests on local machine

(cherry picked from commit 8b899a7)
This commit is contained in:
Nikolay Krasko
2016-09-16 21:38:53 +03:00
committed by Nikolay Krasko
parent 520e187e46
commit 0abf94c2f4
2 changed files with 76 additions and 3 deletions
@@ -73,8 +73,29 @@ public class MockLibraryUtil {
@NotNull String... extraClasspath
) {
try {
File contentDir = KotlinTestUtils.tmpDir("testLibrary-" + jarName);
return compileLibraryToJar(
sourcesPath,
KotlinTestUtils.tmpDir("testLibrary-" + jarName),
jarName,
addSources,
allowKotlinPackage,
extraClasspath);
}
catch (IOException e) {
throw ExceptionUtilsKt.rethrow(e);
}
}
@NotNull
public static File compileLibraryToJar(
@NotNull String sourcesPath,
@NotNull File contentDir,
@NotNull String jarName,
boolean addSources,
boolean allowKotlinPackage,
@NotNull String... extraClasspath
) {
try {
File classesDir = new File(contentDir, "classes");
File srcFile = new File(sourcesPath);