Fixes after code review
This commit is contained in:
+1
-1
@@ -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)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -22,6 +22,8 @@ where advanced options include:
|
||||
-Xfriend-paths=<path> Paths to output directories for friend modules (whose internals should be visible)
|
||||
-Xmultifile-parts-inherit Compile multifile classes as a hierarchy of parts and facade
|
||||
-Xmodule-path=<path> Paths where to find Java 9+ modules
|
||||
-Xjava-package-prefix Package prefix for Java files
|
||||
-Xjava-source-roots=<path> Paths to directories with Java source files
|
||||
-Xjavac-arguments=<option[,]> Java compiler arguments
|
||||
-Xjsr305={ignore/strict/warn}|under-migration:{ignore/strict/warn}|@<fq.name>:{ignore/strict/warn}
|
||||
Specify behavior for JSR-305 nullability annotations:
|
||||
|
||||
Reference in New Issue
Block a user