[native] Drop deprecated Kotlin/Native targets (5/8)

Adjust KGP: drop usages of deprecated KonanTargets, leave
@Deprecated-stubs in public APIs for readable errors

^KT-64517
This commit is contained in:
Dmitry Savvinov
2024-01-30 15:58:10 +01:00
committed by Space Team
parent 4957d99fd6
commit 8f3c0e71fa
18 changed files with 91 additions and 167 deletions
@@ -1,7 +1,7 @@
package org.jetbrains.kotlin.gradle.plugin
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
import org.jetbrains.kotlin.konan.target.DEPRECATED_TARGET_MESSAGE
import org.jetbrains.kotlin.konan.target.REMOVED_TARGET_MESSAGE
@KotlinTargetsDsl
@ExperimentalKotlinGradlePluginApi
@@ -150,7 +150,7 @@ interface KotlinHierarchyBuilder {
fun withAndroidNativeX86()
fun withAndroidNativeArm32()
fun withAndroidNativeArm64()
fun withIosArm32()
fun withIosArm64()
fun withIosX64()
fun withIosSimulatorArm64()
@@ -168,21 +168,24 @@ interface KotlinHierarchyBuilder {
fun withMacosArm64()
fun withLinuxArm64()
@Deprecated(DEPRECATED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
@Deprecated(message = REMOVED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
fun withIosArm32()
@Deprecated(REMOVED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
fun withWatchosX86()
@Deprecated(DEPRECATED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
@Deprecated(REMOVED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
fun withMingwX86()
@Deprecated(DEPRECATED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
@Deprecated(REMOVED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
fun withLinuxArm32Hfp()
@Deprecated(DEPRECATED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
@Deprecated(REMOVED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
fun withLinuxMips32()
@Deprecated(DEPRECATED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
@Deprecated(REMOVED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
fun withLinuxMipsel32()
@Deprecated(DEPRECATED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
@Deprecated(REMOVED_TARGET_MESSAGE, level = DeprecationLevel.ERROR)
fun withWasm32()
}
@@ -52,16 +52,12 @@ enum class NativeOutputKind(
CompilerOutputKind.DYNAMIC,
"shared",
description = "a dynamic library"
) {
override fun availableFor(target: KonanTarget) = target != KonanTarget.WASM32
},
),
STATIC(
CompilerOutputKind.STATIC,
"static",
description = "a static library"
) {
override fun availableFor(target: KonanTarget) = target != KonanTarget.WASM32
},
),
FRAMEWORK(
CompilerOutputKind.FRAMEWORK,
"framework",
@@ -83,4 +79,4 @@ enum class BitcodeEmbeddingMode {
/** Embed placeholder LLVM IR data as a marker. */
MARKER,
}
}