summaryrefslogtreecommitdiff
path: root/gradle/native-targets.gradle
blob: 8ef7f48d129a7475557dfe3deda0f1538cbdad6f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/*
 * Copyright 2017-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license.
 */

static def doesNotDependOnOkio(project) {
    return !project.name.contains("json-okio") && !project.name.contains("json-tests")
}

kotlin {
    applyDefaultHierarchyTemplate {

        // According to https://kotlinlang.org/docs/native-target-support.html
        // Tier 1
        macosX64()
        macosArm64()
        iosSimulatorArm64()
        iosX64()

        // Tier 2
        linuxX64()
        linuxArm64()
        watchosSimulatorArm64()
        watchosX64()
        watchosArm32()
        watchosArm64()
        tvosSimulatorArm64()
        tvosX64()
        tvosArm64()
        iosArm64()

        // Tier 3
        mingwX64()
        // https://github.com/square/okio/issues/1242#issuecomment-1759357336
        if (doesNotDependOnOkio(project)) {
            androidNativeArm32()
            androidNativeArm64()
            androidNativeX86()
            androidNativeX64()
            watchosDeviceArm64()

            // Deprecated, but not removed
            linuxArm32Hfp()
        }
    }
}