is there a plan to support android + jvm targets a...
# multiplatform
d
is there a plan to support android + jvm targets at the same time - noticed this in the kotlin mp docs
Copy code
We don't currently support sharing a source set for these combinations:

    Several JVM targets
    JVM + Android targets
    Several JS targets
b
sharing != depending on. so even now you can have androidMain & jvmMain depend on jvmishMain
❤️ 1
d
I ask because im trying to target android and then use jvm to target desktop - but maybe it would be better to use native to target desktop
ahhhh
i get it now
thank you
b
That text refers to the new commonizer tool for K/N which allows compiling a single sourceSet to multiple native targets.
k
⏸️ Sharing code between JVM and Android •
a
you can have android and jvm target in one project
You can have several JVM targets You can have JVM and Android targets You can have Several JS targets What you can't have is more than one Android Target
k
and you can't share source sets between Android and JVM
b
Wait what? @Kris Wong?
You mean if you have android and jvm targets commonMain breaks?
k
see first message in this thread
a
You can share Source Sets, Just last time I checked, IDE wen't bizarre when you did. But gradle couls compile well
something in the lines of commonMain, allJvmMain, androidMain, jvmMain allJvmMain would depend on commonMain, while androidMain and jvmMain would each depend on allJvmMain
t
I think this is the related ticket: https://youtrack.jetbrains.com/issue/KT-42466 Probably worth voting up?