What's difference between `jvmMain` vs `desktopMai...
# compose-desktop
s
What's difference between
jvmMain
vs
desktopMain
?
As you're also library owner, I wanted to ask you one question, I'm planning add support for desktop platform for one of my Kotlin Multiplatform Library. So should I go with
jvm("desktop")
or add separate
mingwX64(), linuxX64(), macosX64()
to support all desktop platforms ?
k
no difference. it is just a source set name
👍 1
s
@Konstantin Tskhovrebov Can you help me with above query ?
k
s
Thanks
m
If your library is pure Kotlin without compose, you can add both JVM and native targets, but if it's a Compose library you can only add jvm target for desktop (and macos but it's experimental)
👍 1
s
Thanks @mohamed rejeb
z
I think jvm is common to android and desktop
At least it is in the androidx projects, I’m not sure how much of that is just how we’ve configured it
m
That's the case for modules that doesn't have the android library gradle plugin. But when you have the android library gradle plugin applied, android and jvm become two different things since android will have access to android specific APIs.
z
Typo in my message now fixed. Android should have access to jvmMain as well
👍 2
219 Views