Stop overwriting values with defaults in compiler arguments

'verbose' option was always lost.
This commit is contained in:
Nikolay Krasko
2017-11-14 12:54:30 +03:00
parent 0480042ffd
commit 0768e7404b
2 changed files with 4 additions and 3 deletions
@@ -45,8 +45,8 @@ internal open class KotlinCompileCommon : AbstractKotlinCompile<K2MetadataCompil
findKotlinMetadataCompilerClasspath(project)
override fun setupCompilerArgs(args: K2MetadataCompilerArguments, defaultsOnly: Boolean) {
super.setupCompilerArgs(args, defaultsOnly)
args.apply { fillDefaultValues() }
super.setupCompilerArgs(args, defaultsOnly)
if (defaultsOnly) return
@@ -281,8 +281,8 @@ open class KotlinCompile : AbstractKotlinCompile<K2JVMCompilerArguments>(), Kotl
}
override fun setupCompilerArgs(args: K2JVMCompilerArguments, defaultsOnly: Boolean) {
super.setupCompilerArgs(args, defaultsOnly)
args.apply { fillDefaultValues() }
super.setupCompilerArgs(args, defaultsOnly)
args.addCompilerBuiltIns = true
@@ -425,8 +425,9 @@ open class Kotlin2JsCompile() : AbstractKotlinCompile<K2JSCompilerArguments>(),
K2JSCompilerArguments()
override fun setupCompilerArgs(args: K2JSCompilerArguments, defaultsOnly: Boolean) {
super.setupCompilerArgs(args, defaultsOnly)
args.apply { fillDefaultValues() }
super.setupCompilerArgs(args, defaultsOnly)
args.outputFile = outputFile
if (defaultsOnly) return