Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated K/N targets in accordance with official recommendations #2216

Merged
merged 4 commits into from
Mar 15, 2023
Merged
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 coroutine; can be removed only when K/N drops the target
shanshin marked this conversation as resolved.
Show resolved Hide resolved
addTarget(presets.watchosX86)

if (doesNotDependOnOkio(project)) {
addTarget(presets.iosArm32)
addTarget(presets.linuxArm32Hfp)
addTarget(presets.mingwX86)
}

}

if (project.ext.nativeState == NativeState.HOST) {
Expand Down