diff --git a/gradle/native-targets.gradle b/gradle/native-targets.gradle index 7b8bf3e271..da954faa07 100644 --- a/gradle/native-targets.gradle +++ b/gradle/native-targets.gradle @@ -99,41 +99,47 @@ kotlin { if (project.ext.singleTargetMode) { fromPreset(project.ext.ideaPreset, 'native') } else { - // Linux + // According to https://kotlinlang.org/docs/native-target-support.html + // Tier 1 addTarget(presets.linuxX64) - if (doesNotDependOnOkio(project)) { - addTarget(presets.linuxArm32Hfp) - addTarget(presets.linuxArm64) - } - - // Mac & iOS addTarget(presets.macosX64) + addTarget(presets.macosArm64) + addTarget(presets.iosSimulatorArm64) + addTarget(presets.iosX64) - addTarget(presets.iosArm64) + // Tier 2 if (doesNotDependOnOkio(project)) { - addTarget(presets.iosArm32) + addTarget(presets.linuxArm64) } - addTarget(presets.iosX64) - - addTarget(presets.watchosX86) + addTarget(presets.watchosSimulatorArm64) addTarget(presets.watchosX64) addTarget(presets.watchosArm32) addTarget(presets.watchosArm64) - - addTarget(presets.tvosArm64) + addTarget(presets.tvosSimulatorArm64) addTarget(presets.tvosX64) + addTarget(presets.tvosArm64) + addTarget(presets.iosArm64) - // Apple Silicon - addTarget(presets.iosSimulatorArm64) - addTarget(presets.watchosSimulatorArm64) - addTarget(presets.tvosSimulatorArm64) - addTarget(presets.macosArm64) + // Tier 3 + if (doesNotDependOnOkio(project)) { + addTarget(presets.androidNativeArm32) + addTarget(presets.androidNativeArm64) + addTarget(presets.androidNativeX86) + addTarget(presets.androidNativeX64) + addTarget(presets.watchosDeviceArm64) + } - // Windows addTarget(presets.mingwX64) + + // Deprecated, but were provided by kotlinx.serialization; can be removed only when K/N drops the target + addTarget(presets.watchosX86) + if (doesNotDependOnOkio(project)) { + addTarget(presets.iosArm32) + addTarget(presets.linuxArm32Hfp) addTarget(presets.mingwX86) } + } if (project.ext.nativeState == NativeState.HOST) {