[Gradle, JS] Apply module name setup regardless of enabled stats

#KT-56705 Fixed
This commit is contained in:
Alexander.Likhachev
2023-02-16 00:15:56 +01:00
committed by Space Team
parent bdf8e6f3a5
commit 76ca96d2e2
@@ -104,13 +104,6 @@ abstract class KotlinJsIrLink @Inject constructor(
KotlinBuildStatsService.applyIfInitialised {
it.report(BooleanMetrics.JS_IR_INCREMENTAL, incrementalJsIr)
val newArgs = K2JSCompilerArguments()
// moduleName can start with @ for group of NPM packages
// but args parsing @ as start of argfile
// so WA we provide moduleName as one parameter
if (args.moduleName != null) {
args.freeArgs += "-ir-output-name=${args.moduleName}"
args.moduleName = null
}
parseCommandLineArguments(ArgumentUtils.convertArgumentsToStringList(args), newArgs)
it.report(
StringMetrics.JS_OUTPUT_GRANULARITY,
@@ -121,6 +114,14 @@ abstract class KotlinJsIrLink @Inject constructor(
)
}
// moduleName can start with @ for group of NPM packages
// but args parsing @ as start of argfile
// so WA we provide moduleName as one parameter
if (args.moduleName != null) {
args.freeArgs += "-ir-output-name=${args.moduleName}"
args.moduleName = null
}
args.includes = entryModule.get().asFile.canonicalPath
if (incrementalJsIr && mode == DEVELOPMENT) {