[Gradle][Native] K2NativeCompilerArguments.refinesPaths: Use Array<String> instead of String

^KT-55071 Verification Pending
This commit is contained in:
Sebastian Sellmair
2022-11-23 13:05:31 +01:00
committed by Space Team
parent 5818187e57
commit 7870c82221
3 changed files with 3 additions and 3 deletions
@@ -289,7 +289,7 @@ class K2NativeCompilerArguments : CommonCompilerArguments() {
valueDescription = "<path>",
description = "Paths to output directories for refined modules (whose expects this module can actualize)"
)
var refinesPaths: String? = null
var refinesPaths: Array<String>? = null
@Argument(value = "-Xdebug-info-version", description = "generate debug info of given version (1, 2)")
var debugInfoFormatVersion: String = "1" /* command line parser doesn't accept kotlin.Int type */
@@ -257,7 +257,7 @@ class K2Native : CLICompiler<K2NativeCompilerArguments>() {
put(FRIEND_MODULES, arguments.friendModules!!.split(File.pathSeparator).filterNot(String::isEmpty))
if(arguments.refinesPaths != null)
put(REFINES_MODULES, arguments.refinesPaths!!.split(File.pathSeparator).filterNot(String::isEmpty))
put(REFINES_MODULES, arguments.refinesPaths!!.filterNot(String::isEmpty))
put(EXPORTED_LIBRARIES, selectExportedLibraries(configuration, arguments, outputKind))
put(INCLUDED_LIBRARIES, selectIncludes(configuration, arguments, outputKind))
@@ -67,7 +67,7 @@ internal fun buildKotlinNativeKlibCompilerArgs(
if (sharedCompilationData != null) {
val refinesPaths = sharedCompilationData.refinesPaths.files
if (refinesPaths.isNotEmpty()) {
addArg("-Xrefines-paths", refinesPaths.joinToString(File.pathSeparator) { it.absolutePath })
addArg("-Xrefines-paths", refinesPaths.joinToString(separator = ",") { it.absolutePath })
}
}