[Gradle][MPP] Deprecate several K/N targets
This commit is contained in:
committed by
Space Team
parent
3d4af8e1ab
commit
37ab139139
+15
-2
@@ -3,6 +3,7 @@
|
||||
package org.jetbrains.kotlin.gradle.plugin
|
||||
|
||||
import org.jetbrains.kotlin.gradle.ExperimentalKotlinGradlePluginApi
|
||||
import org.jetbrains.kotlin.konan.target.DEPRECATED_TARGET_MESSAGE
|
||||
|
||||
@KotlinTargetsDsl
|
||||
@ExperimentalKotlinGradlePluginApi
|
||||
@@ -42,7 +43,6 @@ interface KotlinTargetHierarchyBuilder {
|
||||
fun anyIosSimulatorArm64()
|
||||
fun anyWatchosArm32()
|
||||
fun anyWatchosArm64()
|
||||
fun anyWatchosX86()
|
||||
fun anyWatchosX64()
|
||||
fun anyWatchosSimulatorArm64()
|
||||
fun anyWatchosDeviceArm64()
|
||||
@@ -50,13 +50,26 @@ interface KotlinTargetHierarchyBuilder {
|
||||
fun anyTvosX64()
|
||||
fun anyTvosSimulatorArm64()
|
||||
fun anyLinuxX64()
|
||||
fun anyMingwX86()
|
||||
fun anyMingwX64()
|
||||
fun anyMacosX64()
|
||||
fun anyMacosArm64()
|
||||
fun anyLinuxArm64()
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
fun anyWatchosX86()
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
fun anyMingwX86()
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
fun anyLinuxArm32Hfp()
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
fun anyLinuxMips32()
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
fun anyLinuxMipsel32()
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
fun anyWasm32()
|
||||
}
|
||||
|
||||
+21
-9
@@ -25,6 +25,7 @@ private fun generateAbstractKotlinArtifactsExtensionImplementation() {
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinArtifactsExtension
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType
|
||||
import org.jetbrains.kotlin.konan.target.DEPRECATED_TARGET_MESSAGE
|
||||
import org.jetbrains.kotlin.konan.target.KonanTarget
|
||||
import javax.inject.Inject
|
||||
""".trimIndent()
|
||||
@@ -54,15 +55,15 @@ private fun generateAbstractKotlinArtifactsExtensionImplementation() {
|
||||
"val EmbedBitcodeMode = BitcodeEmbeddingModeDsl()"
|
||||
).joinToString("\n").indented(4)
|
||||
|
||||
val konanTargetConstants = KonanTarget.predefinedTargets.values.joinToString("\n") {
|
||||
val nameParts = it.name.split("_")
|
||||
val name = nameParts.drop(1).joinToString(
|
||||
separator = "",
|
||||
prefix = nameParts.first(),
|
||||
transform = String::capitalizeUS
|
||||
)
|
||||
"val $name = KonanTarget.${it.name.uppercase(Locale.US)}"
|
||||
}.indented(4)
|
||||
val konanTargetConstants = KonanTarget.predefinedTargets.values.filter { !KonanTarget.deprecatedTargets.contains(it) }
|
||||
.joinToString("\n") {
|
||||
it.generateKonanTargetVal()
|
||||
}.indented(4)
|
||||
|
||||
val deprecatedKonanTargetConstants = KonanTarget.predefinedTargets.values.filter { KonanTarget.deprecatedTargets.contains(it) }
|
||||
.joinToString("\n") {
|
||||
"\n@Deprecated(DEPRECATED_TARGET_MESSAGE)\n" + it.generateKonanTargetVal()
|
||||
}.indented(4)
|
||||
|
||||
val code = listOf(
|
||||
"package ${className.packageName()}",
|
||||
@@ -74,9 +75,20 @@ private fun generateAbstractKotlinArtifactsExtensionImplementation() {
|
||||
bitcodeModeConstants,
|
||||
bitcodeMode,
|
||||
konanTargetConstants,
|
||||
deprecatedKonanTargetConstants,
|
||||
"}"
|
||||
).joinToString(separator = "\n\n")
|
||||
|
||||
val targetFile = File("$outputSourceRoot/${className.fqName.replace(".", "/")}.kt")
|
||||
targetFile.writeText(code)
|
||||
}
|
||||
|
||||
private fun KonanTarget.generateKonanTargetVal(): String {
|
||||
val nameParts = this.name.split("_")
|
||||
val name = nameParts.drop(1).joinToString(
|
||||
separator = "",
|
||||
prefix = nameParts.first(),
|
||||
transform = String::capitalizeUS
|
||||
)
|
||||
return "val $name = KonanTarget.${this.name.uppercase(Locale.US)}"
|
||||
}
|
||||
+14
-8
@@ -19,8 +19,10 @@ private val presetsProperty = KotlinTargetsContainerWithPresets::presets.name
|
||||
|
||||
private fun generateKotlinTargetContainerWithPresetFunctionsInterface() {
|
||||
// Generate KotlinMultiplatformExtension subclass with member functions for the presets:
|
||||
val functions = allPresetEntries.map {
|
||||
generatePresetFunctions(it, presetsProperty, "configureOrCreate")
|
||||
val functions = allPresetEntries.map { kotlinPreset ->
|
||||
// magic indent is needed to make the result look pretty
|
||||
val funPrefix = kotlinPreset.deprecation?.let { "\n $it\n @Suppress(\"DEPRECATION\")\n " } ?: ""
|
||||
generatePresetFunctions(kotlinPreset, presetsProperty, "configureOrCreate", funPrefix)
|
||||
}
|
||||
|
||||
val parentInterfaceName =
|
||||
@@ -29,9 +31,12 @@ private fun generateKotlinTargetContainerWithPresetFunctionsInterface() {
|
||||
val className =
|
||||
typeName("org.jetbrains.kotlin.gradle.dsl.KotlinTargetContainerWithPresetFunctions")
|
||||
|
||||
val deprecatedMessageVal = typeName("org.jetbrains.kotlin.konan.target.DEPRECATED_TARGET_MESSAGE")
|
||||
|
||||
val imports = allPresetEntries
|
||||
.flatMap { it.typeNames() }
|
||||
.plus(parentInterfaceName)
|
||||
.plus(deprecatedMessageVal)
|
||||
.plus(typeName(Action::class.java.canonicalName))
|
||||
.filter { it.packageName() != className.packageName() }
|
||||
.flatMap { it.collectFqNames() }
|
||||
@@ -56,11 +61,12 @@ private fun generateKotlinTargetContainerWithPresetFunctionsInterface() {
|
||||
private fun generatePresetFunctions(
|
||||
presetEntry: KotlinPresetEntry,
|
||||
getPresetsExpression: String,
|
||||
configureOrCreateFunctionName: String
|
||||
configureOrCreateFunctionName: String,
|
||||
funPrefix: String = ""
|
||||
): String {
|
||||
val presetName = presetEntry.presetName
|
||||
return """
|
||||
fun $presetName(
|
||||
${funPrefix}fun $presetName(
|
||||
name: String = "$presetName",
|
||||
configure: ${presetEntry.targetType.renderShort()}.() -> Unit = { }
|
||||
): ${presetEntry.targetType.renderShort()} =
|
||||
@@ -70,9 +76,9 @@ private fun generatePresetFunctions(
|
||||
configure
|
||||
)
|
||||
|
||||
fun $presetName() = $presetName("$presetName") { }
|
||||
fun $presetName(name: String) = $presetName(name) { }
|
||||
fun $presetName(name: String, configure: Action<${presetEntry.targetType.renderShort()}>) = $presetName(name) { configure.execute(this) }
|
||||
fun $presetName(configure: Action<${presetEntry.targetType.renderShort()}>) = $presetName { configure.execute(this) }
|
||||
${funPrefix}fun $presetName() = $presetName("$presetName") { }
|
||||
${funPrefix}fun $presetName(name: String) = $presetName(name) { }
|
||||
${funPrefix}fun $presetName(name: String, configure: Action<${presetEntry.targetType.renderShort()}>) = $presetName(name) { configure.execute(this) }
|
||||
${funPrefix}fun $presetName(configure: Action<${presetEntry.targetType.renderShort()}>) = $presetName { configure.execute(this) }
|
||||
""".trimIndent()
|
||||
}
|
||||
|
||||
+4
-2
@@ -14,7 +14,8 @@ import org.jetbrains.kotlin.konan.target.presetName
|
||||
internal class KotlinPresetEntry(
|
||||
val presetName: String,
|
||||
val presetType: TypeName,
|
||||
val targetType: TypeName
|
||||
val targetType: TypeName,
|
||||
val deprecation: String? = null
|
||||
)
|
||||
|
||||
internal fun KotlinPresetEntry.typeNames(): Set<TypeName> = setOf(presetType, targetType)
|
||||
@@ -74,8 +75,9 @@ internal val nativePresetEntries = HostManager().targets
|
||||
else ->
|
||||
Presets.simple to Targets.base
|
||||
}
|
||||
val deprecation = "@Deprecated(DEPRECATED_TARGET_MESSAGE)".takeIf { target in KonanTarget.deprecatedTargets }
|
||||
|
||||
KotlinPresetEntry(target.presetName, typeName(presetType), typeName(targetType))
|
||||
KotlinPresetEntry(target.presetName, typeName(presetType), typeName(targetType), deprecation)
|
||||
}
|
||||
|
||||
internal val allPresetEntries = listOf(
|
||||
|
||||
+106
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithHostTestsPre
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithSimulatorTests
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTargetWithSimulatorTestsPreset
|
||||
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
|
||||
import org.jetbrains.kotlin.konan.target.DEPRECATED_TARGET_MESSAGE
|
||||
|
||||
// DO NOT EDIT MANUALLY! Generated by org.jetbrains.kotlin.generators.gradle.dsl.MppPresetFunctionsCodegenKt
|
||||
|
||||
@@ -107,6 +108,9 @@ interface KotlinTargetContainerWithPresetFunctions : KotlinTargetsContainerWithP
|
||||
fun androidNativeArm64(name: String, configure: Action<KotlinNativeTarget>) = androidNativeArm64(name) { configure.execute(this) }
|
||||
fun androidNativeArm64(configure: Action<KotlinNativeTarget>) = androidNativeArm64 { configure.execute(this) }
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun iosArm32(
|
||||
name: String = "iosArm32",
|
||||
configure: KotlinNativeTarget.() -> Unit = { }
|
||||
@@ -117,9 +121,21 @@ interface KotlinTargetContainerWithPresetFunctions : KotlinTargetsContainerWithP
|
||||
configure
|
||||
)
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun iosArm32() = iosArm32("iosArm32") { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun iosArm32(name: String) = iosArm32(name) { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun iosArm32(name: String, configure: Action<KotlinNativeTarget>) = iosArm32(name) { configure.execute(this) }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun iosArm32(configure: Action<KotlinNativeTarget>) = iosArm32 { configure.execute(this) }
|
||||
|
||||
fun iosArm64(
|
||||
@@ -197,6 +213,9 @@ interface KotlinTargetContainerWithPresetFunctions : KotlinTargetsContainerWithP
|
||||
fun watchosArm64(name: String, configure: Action<KotlinNativeTarget>) = watchosArm64(name) { configure.execute(this) }
|
||||
fun watchosArm64(configure: Action<KotlinNativeTarget>) = watchosArm64 { configure.execute(this) }
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun watchosX86(
|
||||
name: String = "watchosX86",
|
||||
configure: KotlinNativeTargetWithSimulatorTests.() -> Unit = { }
|
||||
@@ -207,9 +226,21 @@ interface KotlinTargetContainerWithPresetFunctions : KotlinTargetsContainerWithP
|
||||
configure
|
||||
)
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun watchosX86() = watchosX86("watchosX86") { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun watchosX86(name: String) = watchosX86(name) { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun watchosX86(name: String, configure: Action<KotlinNativeTargetWithSimulatorTests>) = watchosX86(name) { configure.execute(this) }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun watchosX86(configure: Action<KotlinNativeTargetWithSimulatorTests>) = watchosX86 { configure.execute(this) }
|
||||
|
||||
fun watchosX64(
|
||||
@@ -317,6 +348,9 @@ interface KotlinTargetContainerWithPresetFunctions : KotlinTargetsContainerWithP
|
||||
fun linuxX64(name: String, configure: Action<KotlinNativeTargetWithHostTests>) = linuxX64(name) { configure.execute(this) }
|
||||
fun linuxX64(configure: Action<KotlinNativeTargetWithHostTests>) = linuxX64 { configure.execute(this) }
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun mingwX86(
|
||||
name: String = "mingwX86",
|
||||
configure: KotlinNativeTarget.() -> Unit = { }
|
||||
@@ -327,9 +361,21 @@ interface KotlinTargetContainerWithPresetFunctions : KotlinTargetsContainerWithP
|
||||
configure
|
||||
)
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun mingwX86() = mingwX86("mingwX86") { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun mingwX86(name: String) = mingwX86(name) { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun mingwX86(name: String, configure: Action<KotlinNativeTarget>) = mingwX86(name) { configure.execute(this) }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun mingwX86(configure: Action<KotlinNativeTarget>) = mingwX86 { configure.execute(this) }
|
||||
|
||||
fun mingwX64(
|
||||
@@ -392,6 +438,9 @@ interface KotlinTargetContainerWithPresetFunctions : KotlinTargetsContainerWithP
|
||||
fun linuxArm64(name: String, configure: Action<KotlinNativeTarget>) = linuxArm64(name) { configure.execute(this) }
|
||||
fun linuxArm64(configure: Action<KotlinNativeTarget>) = linuxArm64 { configure.execute(this) }
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxArm32Hfp(
|
||||
name: String = "linuxArm32Hfp",
|
||||
configure: KotlinNativeTarget.() -> Unit = { }
|
||||
@@ -402,11 +451,26 @@ interface KotlinTargetContainerWithPresetFunctions : KotlinTargetsContainerWithP
|
||||
configure
|
||||
)
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxArm32Hfp() = linuxArm32Hfp("linuxArm32Hfp") { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxArm32Hfp(name: String) = linuxArm32Hfp(name) { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxArm32Hfp(name: String, configure: Action<KotlinNativeTarget>) = linuxArm32Hfp(name) { configure.execute(this) }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxArm32Hfp(configure: Action<KotlinNativeTarget>) = linuxArm32Hfp { configure.execute(this) }
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxMips32(
|
||||
name: String = "linuxMips32",
|
||||
configure: KotlinNativeTarget.() -> Unit = { }
|
||||
@@ -417,11 +481,26 @@ interface KotlinTargetContainerWithPresetFunctions : KotlinTargetsContainerWithP
|
||||
configure
|
||||
)
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxMips32() = linuxMips32("linuxMips32") { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxMips32(name: String) = linuxMips32(name) { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxMips32(name: String, configure: Action<KotlinNativeTarget>) = linuxMips32(name) { configure.execute(this) }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxMips32(configure: Action<KotlinNativeTarget>) = linuxMips32 { configure.execute(this) }
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxMipsel32(
|
||||
name: String = "linuxMipsel32",
|
||||
configure: KotlinNativeTarget.() -> Unit = { }
|
||||
@@ -432,11 +511,26 @@ interface KotlinTargetContainerWithPresetFunctions : KotlinTargetsContainerWithP
|
||||
configure
|
||||
)
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxMipsel32() = linuxMipsel32("linuxMipsel32") { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxMipsel32(name: String) = linuxMipsel32(name) { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxMipsel32(name: String, configure: Action<KotlinNativeTarget>) = linuxMipsel32(name) { configure.execute(this) }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun linuxMipsel32(configure: Action<KotlinNativeTarget>) = linuxMipsel32 { configure.execute(this) }
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun wasm32(
|
||||
name: String = "wasm32",
|
||||
configure: KotlinNativeTarget.() -> Unit = { }
|
||||
@@ -447,9 +541,21 @@ interface KotlinTargetContainerWithPresetFunctions : KotlinTargetsContainerWithP
|
||||
configure
|
||||
)
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun wasm32() = wasm32("wasm32") { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun wasm32(name: String) = wasm32(name) { }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun wasm32(name: String, configure: Action<KotlinNativeTarget>) = wasm32(name) { configure.execute(this) }
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
@Suppress("DEPRECATION")
|
||||
fun wasm32(configure: Action<KotlinNativeTarget>) = wasm32 { configure.execute(this) }
|
||||
|
||||
}
|
||||
+15
-8
@@ -12,6 +12,7 @@ import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinNativeTarget
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.KotlinWithJavaTarget
|
||||
import org.jetbrains.kotlin.gradle.targets.js.dsl.KotlinJsTargetDsl
|
||||
import org.jetbrains.kotlin.gradle.targets.jvm.KotlinJvmTarget
|
||||
import org.jetbrains.kotlin.konan.target.DEPRECATED_TARGET_MESSAGE
|
||||
import org.jetbrains.kotlin.konan.target.Family
|
||||
import org.jetbrains.kotlin.konan.target.KonanTarget
|
||||
import org.jetbrains.kotlin.tooling.core.closure
|
||||
@@ -170,10 +171,6 @@ private class KotlinTargetHierarchyBuilderImpl(
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.WATCHOS_ARM64
|
||||
}
|
||||
|
||||
override fun anyWatchosX86() = addTargets {
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.WATCHOS_X86
|
||||
}
|
||||
|
||||
override fun anyWatchosX64() = addTargets {
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.WATCHOS_X64
|
||||
}
|
||||
@@ -202,10 +199,6 @@ private class KotlinTargetHierarchyBuilderImpl(
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.LINUX_X64
|
||||
}
|
||||
|
||||
override fun anyMingwX86() = addTargets {
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.MINGW_X86
|
||||
}
|
||||
|
||||
override fun anyMingwX64() = addTargets {
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.MINGW_X64
|
||||
}
|
||||
@@ -222,18 +215,32 @@ private class KotlinTargetHierarchyBuilderImpl(
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.LINUX_ARM64
|
||||
}
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
override fun anyWatchosX86() = addTargets {
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.WATCHOS_X86
|
||||
}
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
override fun anyMingwX86() = addTargets {
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.MINGW_X86
|
||||
}
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
override fun anyLinuxArm32Hfp() = addTargets {
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.LINUX_ARM32_HFP
|
||||
}
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
override fun anyLinuxMips32() = addTargets {
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.LINUX_MIPS32
|
||||
}
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
override fun anyLinuxMipsel32() = addTargets {
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.LINUX_MIPSEL32
|
||||
}
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
override fun anyWasm32() = addTargets {
|
||||
it is KotlinNativeTarget && it.konanTarget == KonanTarget.WASM32
|
||||
}
|
||||
|
||||
+19
-3
@@ -6,6 +6,7 @@ import org.jetbrains.kotlin.gradle.dsl.KotlinArtifactConfig
|
||||
import org.jetbrains.kotlin.gradle.dsl.KotlinArtifactsExtension
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.BitcodeEmbeddingMode
|
||||
import org.jetbrains.kotlin.gradle.plugin.mpp.NativeBuildType
|
||||
import org.jetbrains.kotlin.konan.target.DEPRECATED_TARGET_MESSAGE
|
||||
import org.jetbrains.kotlin.konan.target.KonanTarget
|
||||
import javax.inject.Inject
|
||||
|
||||
@@ -33,13 +34,11 @@ abstract class KotlinArtifactsExtensionImpl @Inject constructor(project: Project
|
||||
val androidX86 = KonanTarget.ANDROID_X86
|
||||
val androidArm32 = KonanTarget.ANDROID_ARM32
|
||||
val androidArm64 = KonanTarget.ANDROID_ARM64
|
||||
val iosArm32 = KonanTarget.IOS_ARM32
|
||||
val iosArm64 = KonanTarget.IOS_ARM64
|
||||
val iosX64 = KonanTarget.IOS_X64
|
||||
val iosSimulatorArm64 = KonanTarget.IOS_SIMULATOR_ARM64
|
||||
val watchosArm32 = KonanTarget.WATCHOS_ARM32
|
||||
val watchosArm64 = KonanTarget.WATCHOS_ARM64
|
||||
val watchosX86 = KonanTarget.WATCHOS_X86
|
||||
val watchosX64 = KonanTarget.WATCHOS_X64
|
||||
val watchosSimulatorArm64 = KonanTarget.WATCHOS_SIMULATOR_ARM64
|
||||
val watchosDeviceArm64 = KonanTarget.WATCHOS_DEVICE_ARM64
|
||||
@@ -47,14 +46,31 @@ abstract class KotlinArtifactsExtensionImpl @Inject constructor(project: Project
|
||||
val tvosX64 = KonanTarget.TVOS_X64
|
||||
val tvosSimulatorArm64 = KonanTarget.TVOS_SIMULATOR_ARM64
|
||||
val linuxX64 = KonanTarget.LINUX_X64
|
||||
val mingwX86 = KonanTarget.MINGW_X86
|
||||
val mingwX64 = KonanTarget.MINGW_X64
|
||||
val macosX64 = KonanTarget.MACOS_X64
|
||||
val macosArm64 = KonanTarget.MACOS_ARM64
|
||||
val linuxArm64 = KonanTarget.LINUX_ARM64
|
||||
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
val iosArm32 = KonanTarget.IOS_ARM32
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
val watchosX86 = KonanTarget.WATCHOS_X86
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
val mingwX86 = KonanTarget.MINGW_X86
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
val linuxArm32Hfp = KonanTarget.LINUX_ARM32_HFP
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
val linuxMips32 = KonanTarget.LINUX_MIPS32
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
val linuxMipsel32 = KonanTarget.LINUX_MIPSEL32
|
||||
|
||||
@Deprecated(DEPRECATED_TARGET_MESSAGE)
|
||||
val wasm32 = KonanTarget.WASM32
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user