Add annotations-13.0 in classpath of those tests where the annotations from stdlib were used
This commit is contained in:
@@ -22,6 +22,7 @@ import org.jetbrains.kotlin.asJava.classes.KtLightClassForFacade
|
||||
import org.jetbrains.kotlin.asJava.classes.KtLightClassForSourceDeclaration
|
||||
import org.jetbrains.kotlin.asJava.elements.*
|
||||
import org.jetbrains.kotlin.asJava.toLightClass
|
||||
import org.jetbrains.kotlin.codegen.forTestCompile.ForTestCompileRuntime
|
||||
import org.jetbrains.kotlin.idea.KotlinDaemonAnalyzerTestCase
|
||||
import org.jetbrains.kotlin.idea.caches.lightClasses.IDELightClassConstructionContext
|
||||
import org.jetbrains.kotlin.idea.caches.resolve.LightClassLazinessChecker.Tracker.Level.*
|
||||
@@ -91,7 +92,8 @@ abstract class AbstractIdeCompiledLightClassTest : KotlinDaemonAnalyzerTestCase(
|
||||
|
||||
Assert.assertNotNull("Test file not found!", testFile)
|
||||
|
||||
val libraryJar = MockLibraryUtil.compileJvmLibraryToJar(testFile!!.canonicalPath, libName())
|
||||
val libraryJar = MockLibraryUtil.compileJvmLibraryToJar(testFile!!.canonicalPath, libName(),
|
||||
extraClasspath = listOf(ForTestCompileRuntime.jetbrainsAnnotationsForTests().path))
|
||||
val jarUrl = "jar://" + FileUtilRt.toSystemIndependentName(libraryJar.absolutePath) + "!/"
|
||||
ModuleRootModificationUtil.addModuleLibrary(module, jarUrl)
|
||||
}
|
||||
|
||||
+3
-1
@@ -88,7 +88,9 @@ public abstract class AbstractKotlinJpsBuildTestCase extends BaseKotlinJpsBuildT
|
||||
}
|
||||
|
||||
protected static JpsLibrary addKotlinStdlibDependency(@NotNull Collection<JpsModule> modules, boolean exported) {
|
||||
return addDependency(JpsJavaDependencyScope.COMPILE, modules, exported, "kotlin-stdlib", PathUtil.getKotlinPathsForDistDirectory().getStdlibPath());
|
||||
return addDependency(JpsJavaDependencyScope.COMPILE, modules, exported, "kotlin-stdlib",
|
||||
PathUtil.getKotlinPathsForDistDirectory().getStdlibPath(),
|
||||
new File(PathUtil.getKotlinPathsForDistDirectory().getLibPath(), "annotations-13.0.jar"));
|
||||
}
|
||||
|
||||
protected JpsLibrary addDependency(@NotNull String libraryName, @NotNull File libraryFile) {
|
||||
|
||||
Reference in New Issue
Block a user