[JS, IR] Fix wasm tests and presets

This commit is contained in:
Ilya Goncharov
2022-08-03 16:56:17 +02:00
committed by Space Team
parent a3be2c893b
commit 93be8317fa
3 changed files with 3 additions and 3 deletions
@@ -106,7 +106,7 @@ private fun KotlinTargetContainerWithJsPresetFunctions.jsInternal(
presets.getByName(
lowerCamelCaseName(
"js",
if (compilerOrDefault == KotlinJsCompilerType.LEGACY) null else compilerOrDefault.lowerName
if (compilerOrDefault == KotlinJsCompilerType.IR) null else compilerOrDefault.lowerName
)
) as KotlinTargetPreset<KotlinJsTargetDsl>,
configure
@@ -12,7 +12,7 @@ import org.jetbrains.kotlin.gradle.targets.js.ir.KotlinJsIrTarget
fun KotlinJsTargetDsl.calculateJsCompilerType(): KotlinJsCompilerType {
return when {
this is KotlinJsTarget && !this.mixedMode -> KotlinJsCompilerType.LEGACY
this is KotlinJsIrTarget && this.legacyTarget == null -> KotlinJsCompilerType.IR
this is KotlinJsIrTarget && this.legacyTarget == null -> KotlinJsCompilerType.IR
this is KotlinJsIrTarget && this.legacyTarget != null -> KotlinJsCompilerType.BOTH
else -> throw IllegalStateException("Unable to find previous Kotlin/JS compiler type for $this")
}
@@ -26,7 +26,7 @@ class KotlinWasmTargetPreset(
project.logger.warn("New 'wasm' target is Work-in-Progress and is subject to change without notice.")
}
val irTarget = project.objects.newInstance(KotlinJsIrTarget::class.java, project, KotlinPlatformType.wasm, false)
val irTarget = project.objects.newInstance(KotlinJsIrTarget::class.java, project, KotlinPlatformType.wasm)
irTarget.isMpp = true
project.runProjectConfigurationHealthCheckWhenEvaluated {