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 5
5
import org.jetbrains.kotlin.gradle.tasks.*
6
6
import kotlin.collections.joinToString
7
7
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
+ }
11
12
12
13
val globalCompilerArgs
13
14
get() = listOf (
@@ -22,10 +23,7 @@ tasks.withType(KotlinCompilationTask::class).configureEach {
22
23
compilerOptions {
23
24
// Unconditional compiler options
24
25
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) }
29
27
30
28
val isMainTaskName = name.startsWith(" compileKotlin" )
31
29
if (isMainTaskName) {
You can’t perform that action at this time.
0 commit comments