Not an Android dev, but got a question: if my multiplatform project targets
jvm()
, how do I make sure it also supports Android?
m
MR3Y
06/13/2024, 11:50 AM
If you're not using any android specific stuff/APIs, then just declaring
jvm
should be enough as java libraries are available to android without any extra effort.
✔️ 2
☝️ 2
e
Edoardo Luppi
06/13/2024, 11:53 AM
Bytecode level should be 52 (1.8) right?
m
MR3Y
06/13/2024, 12:03 PM
To be conservative and support as many users as possible, yes.
you can also take a look at this section https://developer.android.com/build/jdks#compileSdk to see the compatibility matrix between recent android versions and java versions
e
ephemient
06/13/2024, 4:09 PM
bytecode level doesn't matter too much if the users are using desugar, which is common. but regardless of the bytecode level, there's some classpath APIs which aren't available even with desugar, so you should avoid them for Android users