1
0
Fork 0
mirror of https://github.com/ethauvin/kobalt.git synced 2025-04-26 08:27:12 -07:00

Add a few kotlinc -X flags.

This commit is contained in:
Cedric Beust 2017-01-20 12:17:43 -08:00
parent b7eabecfca
commit 998972f022

View file

@ -134,7 +134,23 @@ class KotlinCompiler @Inject constructor(
val flags = settings.kobaltCompilerFlags?.split(" ")
flags?.forEach {
if (it.startsWith("-X")) when(it.substring(2)) {
"no-call-assertions" -> args.noCallAssertions = true
"no-param-assertions" -> args.noParamAssertions = true
"no-optimize" -> args.noOptimize = true
"report-perf" -> args.reportPerf = true
"multifile-parts-inherit" -> args.inheritMultifileParts = true
"allow-kotlin-package" -> args.allowKotlinPackage = true
"skip-metadata-version-check" -> args.skipMetadataVersionCheck = true
"skip-runtime-version-check" -> args.skipRuntimeVersionCheck = true
"single-module" -> args.singleModule = true
"load-builtins-from-dependencies" -> args.loadBuiltInsFromDependencies = true
"coroutines=enable" -> args.coroutinesEnable = true
"coroutines=warn" -> args.coroutinesWarn = true
"coroutines=error" -> args.coroutinesError = true
"no-inline" -> args.noInline = true
"multi-platform" -> args.multiPlatform = true
"no-check-impl" -> args.noCheckImpl = true
else -> warn("Unknown Kotlin compiler flag found in config.xml: $it")
}
}