@@ -322,6 +322,18 @@ open class Kotlin2JsCompile() : AbstractKotlinCompile<K2JSCompilerArguments>(),
322
322
override fun populateCompilerArguments (): K2JSCompilerArguments {
323
323
val args = K2JSCompilerArguments ().apply { fillDefaultValues() }
324
324
args.outputFile = outputFile
325
+ kotlinOptionsImpl.updateArguments(args)
326
+ return args
327
+ }
328
+
329
+ override fun getSourceRoots () = SourceRoots .KotlinOnly .create(getSource())
330
+
331
+ override fun callCompiler (args : K2JSCompilerArguments , sourceRoots : SourceRoots , changedFiles : ChangedFiles ) {
332
+ sourceRoots as SourceRoots .KotlinOnly
333
+
334
+ logger.debug(" Calling compiler" )
335
+ destinationDir.mkdirs()
336
+ args.freeArgs = args.freeArgs + sourceRoots.kotlinSourceFiles.map { it.absolutePath }
325
337
326
338
val friendDependency = friendTaskName
327
339
?.let { project.getTasksByName(it, false ).singleOrNull() as ? Kotlin2JsCompile }
@@ -340,19 +352,6 @@ open class Kotlin2JsCompile() : AbstractKotlinCompile<K2JSCompilerArguments>(),
340
352
null
341
353
}
342
354
343
- kotlinOptionsImpl.updateArguments(args)
344
- return args
345
- }
346
-
347
- override fun getSourceRoots () = SourceRoots .KotlinOnly .create(getSource())
348
-
349
- override fun callCompiler (args : K2JSCompilerArguments , sourceRoots : SourceRoots , changedFiles : ChangedFiles ) {
350
- sourceRoots as SourceRoots .KotlinOnly
351
-
352
- logger.debug(" Calling compiler" )
353
- destinationDir.mkdirs()
354
- args.freeArgs = args.freeArgs + sourceRoots.kotlinSourceFiles.map { it.absolutePath }
355
-
356
355
logger.kotlinDebug(" compiling with args ${ArgumentUtils .convertArgumentsToStringList(args)} " )
357
356
358
357
val messageCollector = GradleMessageCollector (logger)
0 commit comments