[Gradle] Kotlin2JsCompile: Remove redundant processArgs

KTIJ-24976
This commit is contained in:
Sebastian Sellmair
2023-04-04 22:12:43 +02:00
committed by Space Team
parent 014bb0214f
commit 446c6793a4
2 changed files with 0 additions and 37 deletions
@@ -94,36 +94,6 @@ abstract class KotlinJsIrLink @Inject constructor(
}
}
override fun processArgs(args: K2JSCompilerArguments) {
super.processArgs(args)
KotlinBuildStatsService.applyIfInitialised {
it.report(BooleanMetrics.JS_IR_INCREMENTAL, incrementalJsIr)
val newArgs = K2JSCompilerArguments()
parseCommandLineArguments(ArgumentUtils.convertArgumentsToStringList(args), newArgs)
it.report(
StringMetrics.JS_OUTPUT_GRANULARITY,
if (newArgs.irPerModule)
KotlinJsIrOutputGranularity.PER_MODULE.name.toLowerCaseAsciiOnly()
else
KotlinJsIrOutputGranularity.WHOLE_PROGRAM.name.toLowerCaseAsciiOnly()
)
}
// 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 (usingCacheDirectory()) {
args.cacheDirectory = rootCacheDirectory.get().asFile.also { it.mkdirs() }.absolutePath
}
}
override fun contributeAdditionalCompilerArguments(context: ContributeCompilerArgumentsContext<K2JSCompilerArguments>) {
super.contributeAdditionalCompilerArguments(context)
@@ -286,12 +286,6 @@ abstract class Kotlin2JsCompile @Inject constructor(
override val incrementalProps: List<FileCollection>
get() = super.incrementalProps + listOf(friendDependencies)
open fun processArgs(
args: K2JSCompilerArguments
) {
}
protected open fun contributeAdditionalCompilerArguments(context: ContributeCompilerArgumentsContext<K2JSCompilerArguments>) = Unit
override fun callCompilerAsync(
@@ -345,7 +339,6 @@ abstract class Kotlin2JsCompile @Inject constructor(
reportingSettings = reportingSettings(),
incrementalCompilationEnvironment = icEnv
)
processArgs(args)
compilerRunner.runJsCompilerAsync(
args,
environment,