[CLI] Restore K2JVMCompilerArguments.classpath and javaModulePath
to support IDEs < 2023.2 Reverts: -9dcd40d7b7-fb66764c4dKTIJ-25227
This commit is contained in:
committed by
Space Team
parent
7fe3c5c423
commit
5d0bf2de24
@@ -174,7 +174,7 @@ fun writeOutputsIfNeeded(
|
||||
|
||||
fun ModuleBuilder.configureFromArgs(args: K2JVMCompilerArguments) {
|
||||
args.friendPaths?.forEach { addFriendDir(it) }
|
||||
args.classpath?.forEach { addClasspathEntry(it) }
|
||||
args.classpath?.split(File.pathSeparator)?.forEach { addClasspathEntry(it) }
|
||||
args.javaSourceRoots?.forEach {
|
||||
addJavaSourceRoot(JavaRootPath(it, args.javaPackagePrefix))
|
||||
}
|
||||
|
||||
@@ -177,13 +177,13 @@ fun CompilerConfiguration.configureJdkHomeFromSystemProperty() {
|
||||
}
|
||||
|
||||
fun CompilerConfiguration.configureJavaModulesContentRoots(arguments: K2JVMCompilerArguments) {
|
||||
for (modularRoot in arguments.javaModulePath.orEmpty()) {
|
||||
for (modularRoot in arguments.javaModulePath?.split(File.pathSeparatorChar).orEmpty()) {
|
||||
add(CLIConfigurationKeys.CONTENT_ROOTS, JvmModulePathRoot(File(modularRoot)))
|
||||
}
|
||||
}
|
||||
|
||||
fun CompilerConfiguration.configureContentRootsFromClassPath(arguments: K2JVMCompilerArguments) {
|
||||
for (path in arguments.classpath.orEmpty()) {
|
||||
for (path in arguments.classpath?.split(File.pathSeparatorChar).orEmpty()) {
|
||||
add(CLIConfigurationKeys.CONTENT_ROOTS, JvmClasspathRoot(File(path)))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user