diff --git a/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt b/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt index c3428d7b61c..8b1cf56172b 100644 --- a/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt +++ b/jps/jps-common/src/org/jetbrains/kotlin/config/KotlinFacetSettings.kt @@ -26,6 +26,31 @@ import org.jetbrains.kotlin.platform.impl.JsIdePlatformKind import org.jetbrains.kotlin.platform.impl.JvmIdePlatformKind import org.jetbrains.kotlin.utils.DescriptionAware +@Deprecated("Use IdePlatformKind instead.", level = DeprecationLevel.ERROR) +sealed class TargetPlatformKind( + val version: Version, + val name: String +) : DescriptionAware { + override val description = "$name ${version.description}" + + class Jvm(version: JvmTarget) : @Suppress("DEPRECATION_ERROR") TargetPlatformKind(version, "JVM") { + companion object { + private val JVM_PLATFORMS by lazy { JvmTarget.values().map(::Jvm) } + operator fun get(version: JvmTarget) = JVM_PLATFORMS[version.ordinal] + } + } + + object JavaScript : @Suppress("DEPRECATION_ERROR") TargetPlatformKind( + TargetPlatformVersion.NoVersion, + "JavaScript" + ) + + object Common : @Suppress("DEPRECATION_ERROR") TargetPlatformKind( + TargetPlatformVersion.NoVersion, + "Common (experimental)" + ) +} + object CoroutineSupport { @JvmStatic fun byCompilerArguments(arguments: CommonCompilerArguments?): LanguageFeature.State =