https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
a

andylamax

12/30/2020, 4:08 AM
Hello kotliners, A question of opinion here. I have been building multiplatform libs to be shared across (jvm,android and js). In very many cases, my source codes only reside in
commonMain
which is obviously a good thing. However, I do end up including
jvm
,
android
and
js
as compilation targets. My question. Since the
android
platform basically uses
java
classes. Is there a need for me to keep including
android
as a compilation target? coz I do have the java target and all. Those who skipped compiling for the
android
target, have you ever faced an issue during importing your library to an
android
development? Note: All targets are compiled using the
IR
backend
t

travis

12/30/2020, 5:00 AM
As I understand it, if your library doesn't need Android features then
jvm
is totally sufficient, no need for
android
. Library consumers will be able to use your
jvm
artifacts in their Android apps/libraries. If your library depends on Android specific dependencies then you'll be stuck having to provide
android
artifacts.
👍 3
🤞 2
☝️ 2
a

andylamax

12/30/2020, 5:36 AM
Thank you for your kind words
p

Paul Woitaschek

12/30/2020, 6:36 PM
Yeah I'd recommend not using Android but jvm if possible. Compilation speed is hugely better.
2
a

andylamax

12/31/2020, 4:39 AM
Your advice is already put to action. You guys rock
🎉 2