File tree Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Expand file tree Collapse file tree 2 files changed +20
-9
lines changed Original file line number Diff line number Diff line change @@ -19,11 +19,6 @@ kotlin {
19
19
languageVersion.set(JavaLanguageVersion .of(libs.versions.java.get()))
20
20
}
21
21
}
22
- // TODO: consider supporting non-host native targets.
23
- if (HostManager .host == = KonanTarget .MACOS_X64 ) macosX64(" native" )
24
- if (HostManager .host == = KonanTarget .MACOS_ARM64 ) macosArm64(" native" )
25
- if (HostManager .hostIsLinux) linuxX64(" native" )
26
- if (HostManager .hostIsMingw) mingwX64(" native" )
27
22
28
23
sourceSets {
29
24
commonMain {
@@ -36,9 +31,23 @@ kotlin {
36
31
named(" jvmMain" ) {
37
32
dependsOn(commonMain.get())
38
33
}
34
+ }
35
+ }
39
36
40
- named(" nativeMain" ) {
41
- dependsOn(commonMain.get())
37
+ val nativeBenchmarksEnabled: String by project.parent!!
38
+
39
+ if (nativeBenchmarksEnabled.toBoolean()) {
40
+ kotlin {
41
+ // TODO: consider supporting non-host native targets.
42
+ if (HostManager .host == = KonanTarget .MACOS_X64 ) macosX64(" native" )
43
+ if (HostManager .host == = KonanTarget .MACOS_ARM64 ) macosArm64(" native" )
44
+ if (HostManager .hostIsLinux) linuxX64(" native" )
45
+ if (HostManager .hostIsMingw) mingwX64(" native" )
46
+
47
+ sourceSets {
48
+ named(" nativeMain" ) {
49
+ dependsOn(commonMain.get())
50
+ }
42
51
}
43
52
}
44
53
}
@@ -49,6 +58,8 @@ benchmark {
49
58
this as JvmBenchmarkTarget
50
59
jmhVersion = libs.versions.jmh.get()
51
60
}
52
- register(" native" )
61
+ if (nativeBenchmarksEnabled.toBoolean()) {
62
+ register(" native" )
63
+ }
53
64
}
54
65
}
Original file line number Diff line number Diff line change 5
5
6
6
group =org.jetbrains.kotlinx
7
7
version =0.2.1-SNAPSHOT
8
- kotlin.version =1.8.21
9
8
kotlin.code.style =official
10
9
org.gradle.jvmargs =-Xmx4G
10
+ nativeBenchmarksEnabled =false
You can’t perform that action at this time.
0 commit comments