[Gradle, JS] Remove redundant fixing names
- in case when target name is `jsLegacy` with enabled both mode, we should get `jsLegacyMain` and `jsLegacyTest`, and Gradle plugin creates targets `jsLegacyLegacy` and `jsLegacyIr`, schema is name+suffix where name can be any, KotlinJsTargetPreset's name is name+`Both` so in KotlinJsTargetPreset in `both` case we need remove only `Both` suffix #KT-39213 Fixed
This commit is contained in:
+2
-4
@@ -31,13 +31,11 @@ open class KotlinJsTargetPreset(
|
|||||||
override val platformType: KotlinPlatformType
|
override val platformType: KotlinPlatformType
|
||||||
get() = KotlinPlatformType.js
|
get() = KotlinPlatformType.js
|
||||||
|
|
||||||
override fun useDisambiguitionClassifierAsSourcesetNamePreffix() = false
|
override fun useDisambiguitionClassifierAsSourcesetNamePreffix() = irPreset == null
|
||||||
|
|
||||||
override fun overrideDisambiguitionClassifierOnIdeImport(): String? = if (isMpp) {
|
override fun overrideDisambiguitionClassifierOnIdeImport(): String? = if (isMpp) {
|
||||||
irPreset?.let {
|
irPreset?.let {
|
||||||
name.removeJsCompilerSuffix(KotlinJsCompilerType.LEGACY)
|
name.removeJsCompilerSuffix(KotlinJsCompilerType.BOTH)
|
||||||
.removeJsCompilerSuffix(KotlinJsCompilerType.IR)
|
|
||||||
.removeJsCompilerSuffix(KotlinJsCompilerType.BOTH)
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
null
|
null
|
||||||
|
|||||||
Reference in New Issue
Block a user