@@ -274,50 +274,59 @@ repositories {
274274
275275kotlin {
276276 android()
277- js().browser() // and/or js().node()
277+ js().browser()
278278 macosX64()
279279 iosX64()
280280 iosArm64()
281281
282282 sourceSets {
283283 val commonMain by getting {
284284 dependencies {
285+ api(" org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion} " )
285286 implementation(" com.juul.kable:core:${kableVersion} " )
286287 }
287288 }
288289
289290 val androidMain by getting {
290291 dependencies {
291- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core :${coroutinesVersion} " )
292+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-android :${coroutinesVersion} " )
292293 }
293294 }
294295
295- val jsMain by getting {
296+ val macosX64Main by getting {
296297 dependencies {
297- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion} " )
298+ // Need to specify the Coroutines artifact specific for the target platform (`-macosx64`):
299+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core-macosx64:${coroutinesVersion} -native-mt" ) {
300+ version {
301+ // `strictly` needed to make sure Gradle uses `-native-mt` version.
302+ strictly(" ${coroutinesVersion} -native-mt" )
303+ }
304+ }
298305 }
299306 }
300307
301- val nativeMain by creating {
308+ val iosX64Main by getting {
302309 dependencies {
303- implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core:${coroutinesVersion} -native-mt" ) {
310+ // Need to specify the Coroutines artifact specific for the target platform (`-iosx64`):
311+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core-iosx64:${coroutinesVersion} -native-mt" ) {
304312 version {
313+ // `strictly` needed to make sure Gradle uses `-native-mt` version.
305314 strictly(" ${coroutinesVersion} -native-mt" )
306315 }
307316 }
308317 }
309318 }
310319
311- val macosX64Main by getting {
312- dependsOn(nativeMain)
313- }
314-
315- val iosX64Main by getting {
316- dependsOn(nativeMain)
317- }
318-
319320 val iosArm64Main by getting {
320- dependsOn(nativeMain)
321+ dependencies {
322+ // Need to specify the Coroutines artifact specific for the target platform (`-iosarm64`):
323+ implementation(" org.jetbrains.kotlinx:kotlinx-coroutines-core-iosarm64:${coroutinesVersion} -native-mt" ) {
324+ version {
325+ // `strictly` needed to make sure Gradle uses `-native-mt` version.
326+ strictly(" ${coroutinesVersion} -native-mt" )
327+ }
328+ }
329+ }
321330 }
322331 }
323332}
0 commit comments