[CLI] K2JVMCompilerArguments: Model classpath as Array<String>
to allow interning individual file-path arguments on the IDE KTIJ-24976
This commit is contained in:
committed by
Space Team
parent
7f91e94e7a
commit
9dcd40d7b7
+4
-4
@@ -48,14 +48,14 @@ abstract class AbstractIncrementalJvmCompilerRunnerTest : AbstractIncrementalCom
|
||||
}
|
||||
if (javaSources.isEmpty()) return TestCompilationResult(ExitCode.OK, emptyList(), emptyList())
|
||||
|
||||
val javaClasspath = compileClasspath + File.pathSeparator + kotlinClassesPath
|
||||
val javaClasspath = compileClasspath + kotlinClassesPath
|
||||
val javaDestinationDir = File(workingDir, "java-classes").apply {
|
||||
if (exists()) {
|
||||
deleteRecursively()
|
||||
}
|
||||
mkdirs()
|
||||
}
|
||||
val args = arrayOf("-cp", javaClasspath,
|
||||
val args = arrayOf("-cp", javaClasspath.joinToString(File.pathSeparator),
|
||||
"-d", javaDestinationDir.canonicalPath,
|
||||
*javaSources.map { it.canonicalPath }.toTypedArray()
|
||||
)
|
||||
@@ -73,12 +73,12 @@ abstract class AbstractIncrementalJvmCompilerRunnerTest : AbstractIncrementalCom
|
||||
K2JVMCompilerArguments().apply {
|
||||
moduleName = testDir.name
|
||||
destination = destinationDir.path
|
||||
classpath = compileClasspath
|
||||
classpath = compileClasspath.toTypedArray()
|
||||
}
|
||||
|
||||
private val compileClasspath =
|
||||
listOf(
|
||||
kotlinStdlibJvm,
|
||||
KtTestUtil.getAnnotationsJar()
|
||||
).joinToString(File.pathSeparator) { it.canonicalPath }
|
||||
).map { it.canonicalPath }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user