What needs to be put in the `jvmMain` sourceset fo...
# multiplatform
o
What needs to be put in the
jvmMain
sourceset for kotlin coroutines? Couldn't find anything at the README of the coroutines repo. Also, is there a reason why this doesn't come out-of-the-box? E.g. when I declare that I want to use kotlin coroutines in the project, it could automatically import the specific platform dependencies itself.
k
use
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core-native:$coroutinesVersion")
in your common dependencies
o
So two kotlin coroutines dependencies?
k
1
o
Can you elaborate? What's the use of the coroutines-core-common dependency then, when would someone use that?
I actually added the normal core version to the jvm dependency, that worked
k
the common dependency is common-specific, and there are dependencies for each target as well.
native
is the gradle metadata dependency, so fills in the blanks for each target.