blob: 8ef7f48d129a7475557dfe3deda0f1538cbdad6f [file] [log] [blame]
Leonid Startsev9f6d3b42019-10-09 18:07:41 +03001/*
Leonid Startsev8cbdbfc2021-09-06 14:11:34 +03002 * Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
Leonid Startsev9f6d3b42019-10-09 18:07:41 +03003 */
4
Clara Fok93e18122024-04-23 10:28:10 -07005static def doesNotDependOnOkio(project) {
6 return !project.name.contains("json-okio") && !project.name.contains("json-tests")
Leonid Startsevb2e91042020-10-02 15:44:18 +03007}
8
Leonid Startsev9f6d3b42019-10-09 18:07:41 +03009kotlin {
Clara Fok93e18122024-04-23 10:28:10 -070010 applyDefaultHierarchyTemplate {
Vsevolod Tolstopyatov608cbad2020-09-14 15:38:02 +030011
Clara Fok93e18122024-04-23 10:28:10 -070012 // According to https://kotlinlang.org/docs/native-target-support.html
13 // Tier 1
14 macosX64()
15 macosArm64()
16 iosSimulatorArm64()
17 iosX64()
Vsevolod Tolstopyatov608cbad2020-09-14 15:38:02 +030018
Clara Fok93e18122024-04-23 10:28:10 -070019 // Tier 2
20 linuxX64()
21 linuxArm64()
22 watchosSimulatorArm64()
23 watchosX64()
24 watchosArm32()
25 watchosArm64()
26 tvosSimulatorArm64()
27 tvosX64()
28 tvosArm64()
29 iosArm64()
Leonid Startsev9f6d3b42019-10-09 18:07:41 +030030
Clara Fok93e18122024-04-23 10:28:10 -070031 // Tier 3
32 mingwX64()
33 // https://github.com/square/okio/issues/1242#issuecomment-1759357336
34 if (doesNotDependOnOkio(project)) {
35 androidNativeArm32()
36 androidNativeArm64()
37 androidNativeX86()
38 androidNativeX64()
39 watchosDeviceArm64()
Leonid Startsev9f6d3b42019-10-09 18:07:41 +030040
Clara Fok93e18122024-04-23 10:28:10 -070041 // Deprecated, but not removed
42 linuxArm32Hfp()
Leonid Startsev9f6d3b42019-10-09 18:07:41 +030043 }
44 }
45}