File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change 55import org.jetbrains.kotlin.gradle.tasks.*
66import kotlin.collections.joinToString
77
8- val kotlin_additional_cli_options = providers.gradleProperty(" kotlin_additional_cli_options" )
9- .map { it.split(" " ) }
10- .orNull
8+ val kotlinAdditionalCliOptions = providers.gradleProperty(" kotlin_additional_cli_options" )
9+ .orNull?.let { options ->
10+ options.removeSurrounding(" \" " ).split(" " ).filter { it.isNotBlank() }
11+ }
1112
1213val globalCompilerArgs
1314 get() = listOf (
@@ -22,10 +23,7 @@ tasks.withType(KotlinCompilationTask::class).configureEach {
2223 compilerOptions {
2324 // Unconditional compiler options
2425 freeCompilerArgs.addAll(globalCompilerArgs)
25-
26- if (kotlin_additional_cli_options != null ) {
27- freeCompilerArgs.addAll(kotlin_additional_cli_options)
28- }
26+ kotlinAdditionalCliOptions?.forEach { option -> freeCompilerArgs.add(option) }
2927
3028 val isMainTaskName = name.startsWith(" compileKotlin" )
3129 if (isMainTaskName) {
You can’t perform that action at this time.
0 commit comments