提交 18914ac9 编写于 作者: I Ilya Goncharov

[Gradle, JS] Fix name of publication in both mode

上级 60d62148
......@@ -13,6 +13,7 @@ import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
import org.jetbrains.kotlin.gradle.plugin.*
import org.jetbrains.kotlin.gradle.plugin.AbstractKotlinTargetConfigurator.Companion.runTaskNameSuffix
import org.jetbrains.kotlin.gradle.plugin.KotlinCompilation.Companion.MAIN_COMPILATION_NAME
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType.LEGACY
import org.jetbrains.kotlin.gradle.plugin.mpp.*
import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsBrowserDsl
import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsNodeDsl
......@@ -55,7 +56,7 @@ constructor(
val disambiguationClassifierInPlatform: String?
get() = if (irTarget != null) {
disambiguationClassifier?.removeJsCompilerSuffix(KotlinJsCompilerType.LEGACY)
disambiguationClassifier?.removeJsCompilerSuffix(LEGACY)
} else {
disambiguationClassifier
}
......@@ -70,7 +71,7 @@ constructor(
val componentName =
if (project.kotlinExtension is KotlinMultiplatformExtension)
targetName
irTarget?.let { targetName.removeJsCompilerSuffix(LEGACY) } ?: targetName
else PRIMARY_SINGLE_COMPONENT_NAME
val result = createKotlinVariant(componentName, mainCompilation, usageContexts)
......@@ -104,7 +105,7 @@ constructor(
): KotlinVariant {
return super.createKotlinVariant(componentName, compilation, usageContexts).apply {
irTarget?.let {
artifactTargetName = targetName.removeJsCompilerSuffix(KotlinJsCompilerType.LEGACY)
artifactTargetName = targetName.removeJsCompilerSuffix(LEGACY)
}
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册