Misc: Protect freeArgs with FreezableVar
This commit is contained in:
+2
-2
@@ -120,7 +120,7 @@ internal class GradleCompilerRunner(private val project: Project) : KotlinCompil
|
||||
args: K2JSCompilerArguments,
|
||||
environment: GradleCompilerEnvironment
|
||||
): ExitCode {
|
||||
args.freeArgs.addAll(kotlinSources.map { it.absolutePath })
|
||||
args.freeArgs += kotlinSources.map { it.absolutePath }
|
||||
return runCompiler(K2JS_COMPILER, args, environment)
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ internal class GradleCompilerRunner(private val project: Project) : KotlinCompil
|
||||
args: K2MetadataCompilerArguments,
|
||||
environment: GradleCompilerEnvironment
|
||||
): ExitCode {
|
||||
args.freeArgs.addAll(kotlinSources.map { it.absolutePath })
|
||||
args.freeArgs += kotlinSources.map { it.absolutePath }
|
||||
return runCompiler(K2METADATA_COMPILER, args, environment)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -21,5 +21,5 @@ import org.jetbrains.kotlin.cli.common.arguments.CommonToolArguments
|
||||
fun KotlinCommonToolOptions.copyFreeCompilerArgsToArgs(args: CommonToolArguments) {
|
||||
// cast to List<Any> is important because in Groovy a GString can be inside of a list
|
||||
val freeArgs = (freeCompilerArgs as List<Any>).map(Any::toString)
|
||||
args.freeArgs.addAll(freeArgs)
|
||||
args.freeArgs += freeArgs
|
||||
}
|
||||
Reference in New Issue
Block a user