[Gradle, JS] Rename public KotlinJsCompilerType
This commit is contained in:
+4
-4
@@ -10,7 +10,7 @@ import java.io.Serializable
|
||||
|
||||
// For Gradle attributes
|
||||
@Suppress("EnumEntryName")
|
||||
enum class JsCompilerType : Named, Serializable {
|
||||
enum class KotlinJsCompilerType : Named, Serializable {
|
||||
legacy,
|
||||
ir,
|
||||
both;
|
||||
@@ -24,13 +24,13 @@ enum class JsCompilerType : Named, Serializable {
|
||||
companion object {
|
||||
const val jsCompilerProperty = "kotlin.js.compiler"
|
||||
|
||||
fun byArgument(argument: String): JsCompilerType? =
|
||||
JsCompilerType
|
||||
fun byArgument(argument: String): KotlinJsCompilerType? =
|
||||
KotlinJsCompilerType
|
||||
.values().firstOrNull { it.name.equals(argument, ignoreCase = true) }
|
||||
}
|
||||
}
|
||||
|
||||
fun String.removeJsCompilerSuffix(compilerType: JsCompilerType): String {
|
||||
fun String.removeJsCompilerSuffix(compilerType: KotlinJsCompilerType): String {
|
||||
val truncatedString = removeSuffix(compilerType.name)
|
||||
if (this != truncatedString) {
|
||||
return truncatedString
|
||||
+1
-1
@@ -6,5 +6,5 @@
|
||||
package org.jetbrains.kotlin.gradle.plugin
|
||||
|
||||
interface KotlinJsCompilerTypeHolder {
|
||||
val defaultJsCompilerType: JsCompilerType
|
||||
val defaultJsCompilerType: KotlinJsCompilerType
|
||||
}
|
||||
+2
-2
@@ -11,7 +11,7 @@ import org.jdom.output.Format
|
||||
import org.jdom.output.XMLOutputter
|
||||
import org.jetbrains.kotlin.gradle.model.ModelContainer
|
||||
import org.jetbrains.kotlin.gradle.model.ModelFetcherBuildAction
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.util.*
|
||||
import org.jetbrains.kotlin.test.util.trimTrailingWhitespaces
|
||||
import org.junit.After
|
||||
@@ -212,7 +212,7 @@ abstract class BaseGradleIT {
|
||||
val withBuildCache: Boolean = false,
|
||||
val kaptOptions: KaptOptions? = null,
|
||||
val parallelTasksInProject: Boolean? = null,
|
||||
val jsCompilerType: JsCompilerType? = null
|
||||
val jsCompilerType: KotlinJsCompilerType? = null
|
||||
)
|
||||
|
||||
data class KaptOptions(val verbose: Boolean, val useWorkers: Boolean, val incrementalKapt: Boolean = false, val includeCompileClasspath: Boolean = true)
|
||||
|
||||
+4
-4
@@ -1,7 +1,7 @@
|
||||
package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.gradle.api.logging.LogLevel
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.tasks.USING_JS_INCREMENTAL_COMPILATION_MESSAGE
|
||||
import org.jetbrains.kotlin.gradle.tasks.USING_JS_IR_BACKEND_MESSAGE
|
||||
import org.jetbrains.kotlin.gradle.util.getFileByName
|
||||
@@ -39,7 +39,7 @@ class Kotlin2JsIrGradlePluginIT : AbstractKotlin2JsGradlePluginIT(true) {
|
||||
|
||||
build(
|
||||
"build",
|
||||
options = defaultBuildOptions().copy(jsCompilerType = JsCompilerType.ir)
|
||||
options = defaultBuildOptions().copy(jsCompilerType = KotlinJsCompilerType.ir)
|
||||
) {
|
||||
assertSuccessful()
|
||||
|
||||
@@ -63,7 +63,7 @@ class Kotlin2JsIrGradlePluginIT : AbstractKotlin2JsGradlePluginIT(true) {
|
||||
|
||||
build(
|
||||
"build",
|
||||
options = defaultBuildOptions().copy(jsCompilerType = JsCompilerType.ir)
|
||||
options = defaultBuildOptions().copy(jsCompilerType = KotlinJsCompilerType.ir)
|
||||
) {
|
||||
assertSuccessful()
|
||||
|
||||
@@ -552,7 +552,7 @@ abstract class AbstractKotlin2JsGradlePluginIT(private val irBackend: Boolean) :
|
||||
gradleSettingsScript().modify(::transformBuildScriptWithPluginsDsl)
|
||||
|
||||
if (irBackend) {
|
||||
gradleProperties().appendText(jsCompilerType(JsCompilerType.ir))
|
||||
gradleProperties().appendText(jsCompilerType(KotlinJsCompilerType.ir))
|
||||
}
|
||||
|
||||
build("build") {
|
||||
|
||||
+4
-4
@@ -6,8 +6,8 @@ package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.jdom.input.SAXBuilder
|
||||
import org.jetbrains.kotlin.gradle.internals.*
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType.*
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType.*
|
||||
import org.jetbrains.kotlin.gradle.plugin.ProjectLocalConfigurations
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJvmWithJavaTargetPreset
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinMultiplatformPlugin
|
||||
@@ -289,7 +289,7 @@ class NewMultiplatformIT : BaseGradleIT() {
|
||||
private fun doTestLibAndAppJsBothCompilers(
|
||||
libProjectName: String,
|
||||
appProjectName: String,
|
||||
jsCompilerType: JsCompilerType
|
||||
jsCompilerType: KotlinJsCompilerType
|
||||
) {
|
||||
val libProject = transformProjectWithPluginsDsl(libProjectName, directoryPrefix = "both-js-lib-and-app")
|
||||
val appProject = transformProjectWithPluginsDsl(appProjectName, directoryPrefix = "both-js-lib-and-app")
|
||||
@@ -366,7 +366,7 @@ class NewMultiplatformIT : BaseGradleIT() {
|
||||
// we use `maven { setUrl(...) }` because this syntax actually works both for Groovy and Kotlin DSLs in Gradle
|
||||
gradleBuildScript().appendText("\nrepositories { maven { setUrl(\"$libLocalRepoUri\") } }")
|
||||
|
||||
fun CompiledProject.checkAppBuild(compilerType: JsCompilerType) {
|
||||
fun CompiledProject.checkAppBuild(compilerType: KotlinJsCompilerType) {
|
||||
assertSuccessful()
|
||||
val compileTaskNames = if (jsCompilerType == compilerType) {
|
||||
compileTasksNames.toTypedArray()
|
||||
|
||||
+2
-2
@@ -5,7 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.util.*
|
||||
import org.junit.Test
|
||||
|
||||
@@ -42,7 +42,7 @@ class VariantAwareDependenciesIT : BaseGradleIT() {
|
||||
assertContains(">> :${innerProject.projectName}:runtime --> sample-lib-nodejs-1.0.jar")
|
||||
}
|
||||
|
||||
gradleProperties().appendText(jsCompilerType(JsCompilerType.ir))
|
||||
gradleProperties().appendText(jsCompilerType(KotlinJsCompilerType.ir))
|
||||
|
||||
testResolveAllConfigurations(
|
||||
subproject = innerProject.projectName,
|
||||
|
||||
+7
-7
@@ -5,7 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle
|
||||
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
import org.junit.Test
|
||||
|
||||
class WorkersIT : BaseGradleIT() {
|
||||
@@ -13,7 +13,7 @@ class WorkersIT : BaseGradleIT() {
|
||||
fun testParallelTasks() {
|
||||
parallelTasksImpl(
|
||||
isParallel = true,
|
||||
jsCompilerType = JsCompilerType.legacy
|
||||
jsCompilerType = KotlinJsCompilerType.legacy
|
||||
)
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class WorkersIT : BaseGradleIT() {
|
||||
fun testParallelTasksJsIr() {
|
||||
parallelTasksImpl(
|
||||
isParallel = true,
|
||||
jsCompilerType = JsCompilerType.ir
|
||||
jsCompilerType = KotlinJsCompilerType.ir
|
||||
)
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ class WorkersIT : BaseGradleIT() {
|
||||
fun testNoParallelTasks() {
|
||||
parallelTasksImpl(
|
||||
isParallel = false,
|
||||
jsCompilerType = JsCompilerType.legacy
|
||||
jsCompilerType = KotlinJsCompilerType.legacy
|
||||
)
|
||||
}
|
||||
|
||||
@@ -37,13 +37,13 @@ class WorkersIT : BaseGradleIT() {
|
||||
fun testNoParallelTasksJsIr() {
|
||||
parallelTasksImpl(
|
||||
isParallel = false,
|
||||
jsCompilerType = JsCompilerType.ir
|
||||
jsCompilerType = KotlinJsCompilerType.ir
|
||||
)
|
||||
}
|
||||
|
||||
private fun parallelTasksImpl(
|
||||
isParallel: Boolean,
|
||||
jsCompilerType: JsCompilerType
|
||||
jsCompilerType: KotlinJsCompilerType
|
||||
) =
|
||||
with(Project("new-mpp-parallel")) {
|
||||
val options = defaultBuildOptions().copy(
|
||||
@@ -64,7 +64,7 @@ class WorkersIT : BaseGradleIT() {
|
||||
kotlinClassesDir(sourceSet = "metadata/main") + "common/A.kotlin_metadata",
|
||||
kotlinClassesDir(sourceSet = "jvm/main") + "common/A.class",
|
||||
kotlinClassesDir(sourceSet = "js/main") +
|
||||
if (jsCompilerType == JsCompilerType.ir) "default/manifest" else "new-mpp-parallel.js"
|
||||
if (jsCompilerType == KotlinJsCompilerType.ir) "default/manifest" else "new-mpp-parallel.js"
|
||||
)
|
||||
expectedKotlinOutputFiles.forEach { assertFileExists(it) }
|
||||
assertSubstringCount("Loaded GradleKotlinCompilerWork", 1)
|
||||
|
||||
+3
-3
@@ -5,7 +5,7 @@
|
||||
|
||||
package org.jetbrains.kotlin.gradle.util
|
||||
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
|
||||
fun jsCompilerType(compilerType: JsCompilerType) =
|
||||
"\n${JsCompilerType.jsCompilerProperty}=$compilerType"
|
||||
fun jsCompilerType(compilerType: KotlinJsCompilerType) =
|
||||
"\n${KotlinJsCompilerType.jsCompilerProperty}=$compilerType"
|
||||
+1
-1
@@ -26,7 +26,7 @@ open class KotlinMultiplatformExtension :
|
||||
override lateinit var targets: NamedDomainObjectCollection<KotlinTarget>
|
||||
internal set
|
||||
|
||||
override lateinit var defaultJsCompilerType: JsCompilerType
|
||||
override lateinit var defaultJsCompilerType: KotlinJsCompilerType
|
||||
internal set
|
||||
|
||||
@Suppress("unused") // DSL
|
||||
|
||||
+3
-3
@@ -22,7 +22,7 @@ import org.gradle.api.Project
|
||||
import org.gradle.api.internal.plugins.DslObject
|
||||
import org.gradle.util.ConfigureUtil
|
||||
import org.jetbrains.kotlin.gradle.plugin.*
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType.*
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType.*
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinAndroidTarget
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinJsSingleTargetPreset
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinWithJavaTarget
|
||||
@@ -111,10 +111,10 @@ open class KotlinJsProjectExtension :
|
||||
_target = value
|
||||
}
|
||||
|
||||
override lateinit var defaultJsCompilerType: JsCompilerType
|
||||
override lateinit var defaultJsCompilerType: KotlinJsCompilerType
|
||||
|
||||
open fun js(
|
||||
compiler: JsCompilerType = defaultJsCompilerType,
|
||||
compiler: KotlinJsCompilerType = defaultJsCompilerType,
|
||||
body: KotlinJsTargetDsl.() -> Unit
|
||||
) {
|
||||
if (_target == null) {
|
||||
|
||||
+6
-6
@@ -2,7 +2,7 @@ package org.jetbrains.kotlin.gradle.dsl
|
||||
|
||||
import groovy.lang.Closure
|
||||
import org.gradle.util.ConfigureUtil
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerTypeHolder
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinTargetPreset
|
||||
import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsTargetDsl
|
||||
@@ -13,15 +13,15 @@ interface KotlinTargetContainerWithJsPresetFunctions :
|
||||
KotlinJsCompilerTypeHolder {
|
||||
fun js(
|
||||
name: String = "js",
|
||||
compiler: JsCompilerType = defaultJsCompilerType,
|
||||
compiler: KotlinJsCompilerType = defaultJsCompilerType,
|
||||
configure: KotlinJsTargetDsl.() -> Unit = { }
|
||||
): KotlinJsTargetDsl =
|
||||
configureOrCreate(
|
||||
lowerCamelCaseName(name, if (compiler == JsCompilerType.both) JsCompilerType.legacy.name else null),
|
||||
lowerCamelCaseName(name, if (compiler == KotlinJsCompilerType.both) KotlinJsCompilerType.legacy.name else null),
|
||||
presets.getByName(
|
||||
lowerCamelCaseName(
|
||||
"js",
|
||||
if (compiler == JsCompilerType.legacy) null else compiler.name
|
||||
if (compiler == KotlinJsCompilerType.legacy) null else compiler.name
|
||||
)
|
||||
) as KotlinTargetPreset<KotlinJsTargetDsl>,
|
||||
configure
|
||||
@@ -33,13 +33,13 @@ interface KotlinTargetContainerWithJsPresetFunctions :
|
||||
) = js(name = name, compiler = defaultJsCompilerType, configure = configure)
|
||||
|
||||
fun js(
|
||||
compiler: JsCompilerType,
|
||||
compiler: KotlinJsCompilerType,
|
||||
configure: KotlinJsTargetDsl.() -> Unit = { }
|
||||
) = js(name = "js", compiler = compiler, configure = configure)
|
||||
|
||||
fun js() = js(name = "js") { }
|
||||
fun js(name: String) = js(name = name) { }
|
||||
fun js(name: String, configure: Closure<*>) = js(name = name) { ConfigureUtil.configure(configure, this) }
|
||||
fun js(compiler: JsCompilerType, configure: Closure<*>) = js(compiler = compiler) { ConfigureUtil.configure(configure, this) }
|
||||
fun js(compiler: KotlinJsCompilerType, configure: Closure<*>) = js(compiler = compiler) { ConfigureUtil.configure(configure, this) }
|
||||
fun js(configure: Closure<*>) = js { ConfigureUtil.configure(configure, this) }
|
||||
}
|
||||
+3
-4
@@ -19,8 +19,7 @@ package org.jetbrains.kotlin.gradle.plugin
|
||||
import org.gradle.api.Project
|
||||
import org.jetbrains.kotlin.gradle.dsl.Coroutines
|
||||
import org.jetbrains.kotlin.gradle.dsl.NativeCacheKind
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType.Companion.jsCompilerProperty
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType.Companion.jsCompilerProperty
|
||||
import org.jetbrains.kotlin.gradle.targets.native.DisabledNativeTargetsReporter
|
||||
import org.jetbrains.kotlin.gradle.tasks.AbstractKotlinCompile
|
||||
import org.jetbrains.kotlin.gradle.tasks.Kotlin2JsCompile
|
||||
@@ -173,8 +172,8 @@ internal class PropertiesProvider private constructor(private val project: Proje
|
||||
/**
|
||||
* Use Kotlin/JS backend mode
|
||||
*/
|
||||
val jsCompiler: JsCompilerType
|
||||
get() = property(jsCompilerProperty)?.let { JsCompilerType.byArgument(it) } ?: JsCompilerType.legacy
|
||||
val jsCompiler: KotlinJsCompilerType
|
||||
get() = property(jsCompilerProperty)?.let { KotlinJsCompilerType.byArgument(it) } ?: KotlinJsCompilerType.legacy
|
||||
|
||||
private fun propertyWithDeprecatedVariant(propName: String, deprecatedPropName: String): String? {
|
||||
val deprecatedProperty = property(deprecatedPropName)
|
||||
|
||||
+2
-3
@@ -27,7 +27,6 @@ import org.gradle.language.base.plugins.LifecycleBasePlugin
|
||||
import org.gradle.language.jvm.tasks.ProcessResources
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinCommonOptions
|
||||
import org.jetbrains.kotlin.gradle.dsl.kotlinExtension
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.*
|
||||
import org.jetbrains.kotlin.gradle.targets.js.KotlinJsTarget
|
||||
import org.jetbrains.kotlin.gradle.targets.js.ir.KotlinJsIrTarget
|
||||
@@ -453,11 +452,11 @@ fun Configuration.usesPlatformOf(target: KotlinTarget): Configuration {
|
||||
attributes.attribute(KotlinPlatformType.attribute, target.platformType)
|
||||
|
||||
if (target is KotlinJsTarget) {
|
||||
attributes.attribute(KotlinJsTarget.jsCompilerAttribute, JsCompilerType.legacy)
|
||||
attributes.attribute(KotlinJsTarget.jsCompilerAttribute, KotlinJsCompilerType.legacy)
|
||||
}
|
||||
|
||||
if (target is KotlinJsIrTarget) {
|
||||
attributes.attribute(KotlinJsTarget.jsCompilerAttribute, JsCompilerType.ir)
|
||||
attributes.attribute(KotlinJsTarget.jsCompilerAttribute, KotlinJsCompilerType.ir)
|
||||
}
|
||||
|
||||
// TODO: Provide an universal way to copy attributes from the target.
|
||||
|
||||
+3
-3
@@ -41,7 +41,7 @@ constructor(
|
||||
internal set
|
||||
|
||||
val disambiguationClassifierInPlatform: String?
|
||||
get() = disambiguationClassifier?.removeJsCompilerSuffix(JsCompilerType.legacy)
|
||||
get() = disambiguationClassifier?.removeJsCompilerSuffix(KotlinJsCompilerType.legacy)
|
||||
|
||||
override val kotlinComponents: Set<KotlinTargetComponent> by lazy {
|
||||
if (irTarget == null)
|
||||
@@ -73,7 +73,7 @@ constructor(
|
||||
): KotlinVariant {
|
||||
return super.createKotlinVariant(componentName, compilation, usageContexts).apply {
|
||||
irTarget?.let {
|
||||
artifactTargetName = targetName.removeJsCompilerSuffix(JsCompilerType.legacy)
|
||||
artifactTargetName = targetName.removeJsCompilerSuffix(KotlinJsCompilerType.legacy)
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -198,7 +198,7 @@ constructor(
|
||||
companion object {
|
||||
val jsCompilerAttribute = Attribute.of(
|
||||
"org.jetbrains.kotlin.js.compiler",
|
||||
JsCompilerType::class.java
|
||||
KotlinJsCompilerType::class.java
|
||||
)
|
||||
|
||||
fun setupAttributesMatchingStrategy(attributesSchema: AttributesSchema) {
|
||||
|
||||
+4
-4
@@ -9,7 +9,7 @@
|
||||
package org.jetbrains.kotlin.gradle.plugin.mpp
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
|
||||
import org.jetbrains.kotlin.gradle.plugin.removeJsCompilerSuffix
|
||||
import org.jetbrains.kotlin.gradle.targets.js.KotlinJsTarget
|
||||
@@ -37,7 +37,7 @@ open class KotlinJsTargetPreset(
|
||||
platformType
|
||||
).apply {
|
||||
this.irTarget = irPreset?.createTarget(
|
||||
lowerCamelCaseName(name.removeJsCompilerSuffix(JsCompilerType.legacy), JsCompilerType.ir.name)
|
||||
lowerCamelCaseName(name.removeJsCompilerSuffix(KotlinJsCompilerType.legacy), KotlinJsCompilerType.ir.name)
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -49,7 +49,7 @@ open class KotlinJsTargetPreset(
|
||||
override fun getName(): String {
|
||||
return lowerCamelCaseName(
|
||||
PRESET_NAME,
|
||||
irPreset?.let { JsCompilerType.both.name }
|
||||
irPreset?.let { KotlinJsCompilerType.both.name }
|
||||
)
|
||||
}
|
||||
|
||||
@@ -73,7 +73,7 @@ class KotlinJsSingleTargetPreset(
|
||||
override fun provideTargetDisambiguationClassifier(target: KotlinOnlyTarget<KotlinJsCompilation>): String? =
|
||||
irPreset?.let {
|
||||
super.provideTargetDisambiguationClassifier(target)
|
||||
?.removePrefix(target.name.removeJsCompilerSuffix(JsCompilerType.legacy))
|
||||
?.removePrefix(target.name.removeJsCompilerSuffix(KotlinJsCompilerType.legacy))
|
||||
?.decapitalize()
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -9,7 +9,7 @@ import org.gradle.api.NamedDomainObjectContainer
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.api.Task
|
||||
import org.jetbrains.kotlin.gradle.plugin.AbstractKotlinTargetConfigurator.Companion.runTaskNameSuffix
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinTargetWithTests
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinOnlyTarget
|
||||
@@ -37,7 +37,7 @@ constructor(
|
||||
internal set
|
||||
|
||||
val disambiguationClassifierInPlatform: String?
|
||||
get() = disambiguationClassifier?.removeJsCompilerSuffix(JsCompilerType.ir)
|
||||
get() = disambiguationClassifier?.removeJsCompilerSuffix(KotlinJsCompilerType.ir)
|
||||
|
||||
var producingType: KotlinJsProducingType? = null
|
||||
|
||||
|
||||
+3
-3
@@ -6,7 +6,7 @@
|
||||
package org.jetbrains.kotlin.gradle.targets.js.ir
|
||||
|
||||
import org.gradle.api.Project
|
||||
import org.jetbrains.kotlin.gradle.plugin.JsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinJsCompilerType
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinOnlyTargetConfigurator
|
||||
import org.jetbrains.kotlin.gradle.plugin.KotlinPlatformType
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinCompilationFactory
|
||||
@@ -45,7 +45,7 @@ open class KotlinJsIrTargetPreset(
|
||||
companion object {
|
||||
val PRESET_NAME = lowerCamelCaseName(
|
||||
"js",
|
||||
JsCompilerType.ir.name
|
||||
KotlinJsCompilerType.ir.name
|
||||
)
|
||||
}
|
||||
}
|
||||
@@ -61,7 +61,7 @@ class KotlinJsIrSingleTargetPreset(
|
||||
override fun provideTargetDisambiguationClassifier(target: KotlinOnlyTarget<KotlinJsIrCompilation>): String? {
|
||||
return if (mixedMode!!) {
|
||||
super.provideTargetDisambiguationClassifier(target)
|
||||
?.removePrefix(target.name.removeJsCompilerSuffix(JsCompilerType.ir))
|
||||
?.removePrefix(target.name.removeJsCompilerSuffix(KotlinJsCompilerType.ir))
|
||||
?.decapitalize()
|
||||
} else {
|
||||
null
|
||||
|
||||
Reference in New Issue
Block a user