Support "-module-name" argument for common code compiler
#KT-20892 Fixed
This commit is contained in:
+3
@@ -31,4 +31,7 @@ class K2MetadataCompilerArguments : CommonCompilerArguments() {
|
||||
description = "Paths where to find library .kotlin_metadata files"
|
||||
)
|
||||
var classpath: String? by FreezableVar(null)
|
||||
|
||||
@Argument(value = "-module-name", valueDescription = "<name>", description = "Name of the generated .kotlin_module file")
|
||||
var moduleName: String? by FreezableVar(null)
|
||||
}
|
||||
|
||||
@@ -64,7 +64,7 @@ class K2MetadataCompiler : CLICompiler<K2MetadataCompilerArguments>() {
|
||||
configuration.addJvmClasspathRoots(arguments.classpath!!.split(File.pathSeparatorChar).map(::File))
|
||||
}
|
||||
|
||||
configuration.put(CommonConfigurationKeys.MODULE_NAME, JvmAbi.DEFAULT_MODULE_NAME)
|
||||
configuration.put(CommonConfigurationKeys.MODULE_NAME, arguments.moduleName ?: JvmAbi.DEFAULT_MODULE_NAME)
|
||||
|
||||
val destination = arguments.destination
|
||||
if (destination != null) {
|
||||
|
||||
Reference in New Issue
Block a user