[Gradle] Kotlin2JsCompile: Remove redundant processArgs
KTIJ-24976
This commit is contained in:
committed by
Space Team
parent
014bb0214f
commit
446c6793a4
-30
@@ -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>) {
|
override fun contributeAdditionalCompilerArguments(context: ContributeCompilerArgumentsContext<K2JSCompilerArguments>) {
|
||||||
super.contributeAdditionalCompilerArguments(context)
|
super.contributeAdditionalCompilerArguments(context)
|
||||||
|
|
||||||
|
|||||||
-7
@@ -286,12 +286,6 @@ abstract class Kotlin2JsCompile @Inject constructor(
|
|||||||
override val incrementalProps: List<FileCollection>
|
override val incrementalProps: List<FileCollection>
|
||||||
get() = super.incrementalProps + listOf(friendDependencies)
|
get() = super.incrementalProps + listOf(friendDependencies)
|
||||||
|
|
||||||
open fun processArgs(
|
|
||||||
args: K2JSCompilerArguments
|
|
||||||
) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
protected open fun contributeAdditionalCompilerArguments(context: ContributeCompilerArgumentsContext<K2JSCompilerArguments>) = Unit
|
protected open fun contributeAdditionalCompilerArguments(context: ContributeCompilerArgumentsContext<K2JSCompilerArguments>) = Unit
|
||||||
|
|
||||||
override fun callCompilerAsync(
|
override fun callCompilerAsync(
|
||||||
@@ -345,7 +339,6 @@ abstract class Kotlin2JsCompile @Inject constructor(
|
|||||||
reportingSettings = reportingSettings(),
|
reportingSettings = reportingSettings(),
|
||||||
incrementalCompilationEnvironment = icEnv
|
incrementalCompilationEnvironment = icEnv
|
||||||
)
|
)
|
||||||
processArgs(args)
|
|
||||||
compilerRunner.runJsCompilerAsync(
|
compilerRunner.runJsCompilerAsync(
|
||||||
args,
|
args,
|
||||||
environment,
|
environment,
|
||||||
|
|||||||
Reference in New Issue
Block a user