Skip to content

Commit 2705318

Browse files
Abduqodiri Qurbonzodaqurbonzoda
authored andcommitted
Add macosArm64 target to template project of the integration test
1 parent 37954a7 commit 2705318

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

integration/build.gradle.kts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import org.jetbrains.kotlin.gradle.dsl.*
21
import org.jetbrains.kotlin.konan.target.*
32

43
plugins {
@@ -33,7 +32,8 @@ val nativeTargetName
3332
project.getSystemProperty("idea.active") == "true" -> "native"
3433
HostManager.hostIsLinux -> "linuxX64"
3534
HostManager.hostIsMingw -> "mingwX64"
36-
HostManager.hostIsMac -> "macosX64"
35+
HostManager.host == KonanTarget.MACOS_X64 -> "macosX64"
36+
HostManager.host == KonanTarget.MACOS_ARM64 -> "macosArm64"
3737
else -> error("Unknown host: ${HostManager.host}")
3838
}
3939

integration/src/test/resources/templates/kotlin-multiplatform/build.gradle

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
import org.jetbrains.kotlin.konan.target.KonanTarget
2+
import org.jetbrains.kotlin.konan.target.HostManager
3+
14
kotlin {
25
jvm {
36
compilations.all {
@@ -9,9 +12,10 @@ kotlin {
912
nodejs()
1013
}
1114

12-
if (org.jetbrains.kotlin.konan.target.HostManager.hostIsLinux) linuxX64('native')
13-
if (org.jetbrains.kotlin.konan.target.HostManager.hostIsMingw) mingwX64('native')
14-
if (org.jetbrains.kotlin.konan.target.HostManager.hostIsMac) macosX64('native')
15+
if (HostManager.hostIsLinux) linuxX64('native')
16+
if (HostManager.hostIsMingw) mingwX64('native')
17+
if (HostManager.host == KonanTarget.MACOS_X64.INSTANCE) macosX64('native')
18+
if (HostManager.host == KonanTarget.MACOS_ARM64.INSTANCE) macosArm64('native')
1519

1620
sourceSets {
1721
commonMain {
@@ -30,7 +34,7 @@ kotlin {
3034
}
3135
}
3236
nativeMain {
33-
dependsOn commonMain
37+
dependsOn(commonMain)
3438
dependencies {
3539
implementation(benchmarkRuntimeNative)
3640
}

0 commit comments

Comments
 (0)