Skip to content

Commit

Permalink
Updated K/N targets in accordance with official recommendations (#2216)
Browse files Browse the repository at this point in the history
Resolves #2210
  • Loading branch information
shanshin authored Mar 15, 2023
1 parent abb8afc commit ac962fc
Showing 1 changed file with 26 additions and 20 deletions.
46 changes: 26 additions & 20 deletions gradle/native-targets.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit ac962fc

Please sign in to comment.