From c4e794b21fb41ad651b7f8ec2ac523fbf16ec03a Mon Sep 17 00:00:00 2001 From: Ilya Gorbunov Date: Tue, 11 Sep 2018 19:06:50 +0300 Subject: [PATCH] Add nullability annotations jar to debugger test application compile classpath --- .../kotlin/codegen/forTestCompile/ForTestCompileRuntime.java | 5 +++++ .../kotlin/idea/debugger/KotlinDebuggerTestCase.java | 5 ++++- .../kotlin/idea/debugger/KotlinDebuggerTestCase.java.173 | 5 ++++- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java index ddd35f1cb0a..f10c59e9f3f 100644 --- a/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java +++ b/compiler/tests-common/tests/org/jetbrains/kotlin/codegen/forTestCompile/ForTestCompileRuntime.java @@ -84,6 +84,11 @@ public class ForTestCompileRuntime { return assertExists(new File("dist/kotlinc/lib/kotlin-stdlib-js.jar")); } + @NotNull + public static File jetbrainsAnnotationsForTests() { + return assertExists(new File("dist/kotlinc/lib/annotations-13.0.jar")); + } + @NotNull public static File jvmAnnotationsForTests() { return assertExists(new File("dist/kotlinc/lib/kotlin-annotations-jvm.jar")); diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestCase.java b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestCase.java index dc780ad2c90..e88e8037051 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestCase.java +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestCase.java @@ -252,7 +252,10 @@ public abstract class KotlinDebuggerTestCase extends DescriptorTestCase { MockLibraryUtil.compileKotlin(sourcesDir, outDir, CUSTOM_LIBRARY_JAR.getPath()); List options = - Arrays.asList("-d", outputDirPath, "-classpath", ForTestCompileRuntime.runtimeJarForTests().getPath(), "-g"); + Arrays.asList("-d", outputDirPath, "-classpath", + ForTestCompileRuntime.runtimeJarForTests().getPath() + File.pathSeparator + + ForTestCompileRuntime.jetbrainsAnnotationsForTests().getPath(), + "-g"); KotlinTestUtils.compileJavaFiles(findJavaFiles(new File(sourcesDir)), options); DexLikeBytecodePatchKt.patchDexTests(outDir); diff --git a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestCase.java.173 b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestCase.java.173 index 81787ed5741..f9df9b06f07 100644 --- a/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestCase.java.173 +++ b/idea/tests/org/jetbrains/kotlin/idea/debugger/KotlinDebuggerTestCase.java.173 @@ -282,7 +282,10 @@ public abstract class KotlinDebuggerTestCase extends DescriptorTestCase { MockLibraryUtil.compileKotlin(sourcesDir, outDir, CUSTOM_LIBRARY_JAR.getPath()); List options = - Arrays.asList("-d", outputDirPath, "-classpath", ForTestCompileRuntime.runtimeJarForTests().getPath(), "-g"); + Arrays.asList("-d", outputDirPath, "-classpath", + ForTestCompileRuntime.runtimeJarForTests().getPath() + File.pathSeparator + + ForTestCompileRuntime.jetbrainsAnnotationsForTests().getPath(), + "-g"); KotlinTestUtils.compileJavaFiles(findJavaFiles(new File(sourcesDir)), options); DexLikeBytecodePatchKt.patchDexTests(outDir);