@@ -99,41 +99,47 @@ kotlin {
99
99
if (project. ext. singleTargetMode) {
100
100
fromPreset(project. ext. ideaPreset, ' native' )
101
101
} else {
102
- // Linux
102
+ // According to https://kotlinlang.org/docs/native-target-support.html
103
+ // Tier 1
103
104
addTarget(presets. linuxX64)
104
- if (doesNotDependOnOkio(project)) {
105
- addTarget(presets. linuxArm32Hfp)
106
- addTarget(presets. linuxArm64)
107
- }
108
-
109
- // Mac & iOS
110
105
addTarget(presets. macosX64)
106
+ addTarget(presets. macosArm64)
107
+ addTarget(presets. iosSimulatorArm64)
108
+ addTarget(presets. iosX64)
111
109
112
- addTarget(presets . iosArm64)
110
+ // Tier 2
113
111
if (doesNotDependOnOkio(project)) {
114
- addTarget(presets. iosArm32 )
112
+ addTarget(presets. linuxArm64 )
115
113
}
116
- addTarget(presets. iosX64)
117
-
118
- addTarget(presets. watchosX86)
114
+ addTarget(presets. watchosSimulatorArm64)
119
115
addTarget(presets. watchosX64)
120
116
addTarget(presets. watchosArm32)
121
117
addTarget(presets. watchosArm64)
122
-
123
- addTarget(presets. tvosArm64)
118
+ addTarget(presets. tvosSimulatorArm64)
124
119
addTarget(presets. tvosX64)
120
+ addTarget(presets. tvosArm64)
121
+ addTarget(presets. iosArm64)
125
122
126
- // Apple Silicon
127
- addTarget(presets. iosSimulatorArm64)
128
- addTarget(presets. watchosSimulatorArm64)
129
- addTarget(presets. tvosSimulatorArm64)
130
- addTarget(presets. macosArm64)
123
+ // Tier 3
124
+ if (doesNotDependOnOkio(project)) {
125
+ addTarget(presets. androidNativeArm32)
126
+ addTarget(presets. androidNativeArm64)
127
+ addTarget(presets. androidNativeX86)
128
+ addTarget(presets. androidNativeX64)
129
+ addTarget(presets. watchosDeviceArm64)
130
+ }
131
131
132
- // Windows
133
132
addTarget(presets. mingwX64)
133
+
134
+ // Deprecated, but were provided by kotlinx.serialization; can be removed only when K/N drops the target
135
+ addTarget(presets. watchosX86)
136
+
134
137
if (doesNotDependOnOkio(project)) {
138
+ addTarget(presets. iosArm32)
139
+ addTarget(presets. linuxArm32Hfp)
135
140
addTarget(presets. mingwX86)
136
141
}
142
+
137
143
}
138
144
139
145
if (project. ext. nativeState == NativeState . HOST ) {
0 commit comments