Hi, is it possible with multiplatform to create tw...
# multiplatform
o
Hi, is it possible with multiplatform to create two separate jvm modules? I would like to have one for regular JVM and one for Android. Or is it because it's the same platform that is impossible?
d
yes it’s possible, there’s
jvm()
and
android()
which you can call in the
kotlin { }
block in the gradle file
❤️ 1
o
thanks, do you know if there is such an example available?
d
https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#setting-up-targets this shows how to set up the different targets (jvm and android for your case)
might also be helpful to read up the Android support section https://kotlinlang.org/docs/reference/building-mpp-with-gradle.html#android-support
o
Thanks! is it possible two have two seperate implementations for the same platform (like two jvm modules or two android modules) by specifying different names?
a
You can have as many jvm targets as you want. But you can have only one android target
s
It should be possible with a
jvm
target. Just give it a different name
jvm("first")
and
jvm("second")
a
and yes, each of them can have different implementations
o
good to know, thanks!