|
5 | 5 | apply plugin: 'org.jetbrains.kotlin.multiplatform'
|
6 | 6 | apply from: rootProject.file("gradle/compile-jvm-multiplatform.gradle")
|
7 | 7 | apply from: rootProject.file("gradle/compile-common.gradle")
|
| 8 | + |
| 9 | +if (rootProject.ext.native_targets_enabled) { |
| 10 | + apply from: rootProject.file("gradle/compile-native-multiplatform.gradle") |
| 11 | +} |
| 12 | + |
8 | 13 | apply from: rootProject.file("gradle/compile-js-multiplatform.gradle")
|
9 |
| -apply from: rootProject.file("gradle/compile-native-multiplatform.gradle") |
10 | 14 | apply from: rootProject.file('gradle/publish-npm-js.gradle')
|
11 | 15 |
|
12 | 16 | /* ==========================================================================
|
@@ -52,8 +56,11 @@ static boolean isNativeDarwin(String name) { return ["ios", "macos", "tvos", "wa
|
52 | 56 | static boolean isNativeOther(String name) { return ["linux", "mingw"].any { name.startsWith(it) } }
|
53 | 57 |
|
54 | 58 | defineSourceSet("concurrent", ["common"]) { it in ["jvm", "native"] }
|
55 |
| -defineSourceSet("nativeDarwin", ["native"]) { isNativeDarwin(it) } |
56 |
| -defineSourceSet("nativeOther", ["native"]) { isNativeOther(it) } |
| 59 | + |
| 60 | +if (rootProject.ext.native_targets_enabled) { |
| 61 | + defineSourceSet("nativeDarwin", ["native"]) { isNativeDarwin(it) } |
| 62 | + defineSourceSet("nativeOther", ["native"]) { isNativeOther(it) } |
| 63 | +} |
57 | 64 |
|
58 | 65 | /* ========================================================================== */
|
59 | 66 |
|
@@ -129,7 +136,7 @@ def configureNativeSourceSetPreset(name, preset) {
|
129 | 136 | }
|
130 | 137 |
|
131 | 138 | // :KLUDGE: Idea.active: Configure platform libraries for native source sets when working in IDEA
|
132 |
| -if (Idea.active) { |
| 139 | +if (Idea.active && rootProject.ext.native_targets_enabled) { |
133 | 140 | def manager = project.ext.hostManager
|
134 | 141 | def linuxPreset = kotlin.presets.linuxX64
|
135 | 142 | def macosPreset = kotlin.presets.macosX64
|
@@ -183,6 +190,13 @@ jvmTest {
|
183 | 190 | exclude '**/*StressTest.*'
|
184 | 191 | }
|
185 | 192 | systemProperty 'kotlinx.coroutines.scheduler.keep.alive.sec', '100000' // any unpark problem hangs test
|
| 193 | + |
| 194 | + // TODO: JVM IR generates different stacktrace so temporary disable stacktrace tests |
| 195 | + if (rootProject.ext.jvm_ir_enabled) { |
| 196 | + filter { |
| 197 | + excludeTestsMatching('kotlinx.coroutines.exceptions.StackTraceRecovery*') |
| 198 | + } |
| 199 | + } |
186 | 200 | }
|
187 | 201 |
|
188 | 202 | jvmJar {
|
|
0 commit comments