Fixes after code review

This commit is contained in:
Alexey Tsvetkov
2019-02-18 14:58:32 +03:00
parent ada880fbad
commit 4154e97aa3
3 changed files with 5 additions and 3 deletions
@@ -195,7 +195,7 @@ class K2JVMCompilerArguments : CommonCompilerArguments() {
@Argument(
value = "-Xjava-source-roots",
valueDescription = "<path>",
description = "Paths to output directories for friend modules (whose internals should be visible)"
description = "Paths to directories with Java source files"
)
var javaSourceRoots: Array<String>? by FreezableVar(null)
@@ -77,11 +77,11 @@ class K2JVMCompiler : CLICompiler<K2JVMCompilerArguments>() {
for (arg in arguments.freeArgs) {
val file = File(arg)
if (file.extension == JavaFileType.DEFAULT_EXTENSION) {
configuration.addJavaSourceRoot(file)
configuration.addJavaSourceRoot(file, arguments.javaPackagePrefix)
} else {
configuration.addKotlinSourceRoot(arg, isCommon = arg in commonSources)
if (file.isDirectory) {
configuration.addJavaSourceRoot(file)
configuration.addJavaSourceRoot(file, arguments.javaPackagePrefix)
}
}
}