https://kotlinlang.org logo
#android
Title
# android
x

xenoterracide

01/29/2019, 10:10 PM
so I haven’t done any android dev, but am working on a library that needs to be android compatible. 1. do I need to use the android plugin for release? (and/or split -android/jre jars) 2. how can I test that it works on … dalvik? the android jvm.
a

Allan Wang

01/29/2019, 10:11 PM
You can use the java-library plugin if your library isn’t solely for android. However, not that depending on the android version, you will not have access to a lot of Java packages (as well as Java 8)
x

xenoterracide

01/29/2019, 10:14 PM
how can I test that? currently using kotlin for language so I figure I’m mostly good there? but I’m not even sure if I need to make changes for that
a

Allan Wang

01/29/2019, 10:15 PM
I’ve never personally had any compatibility issues with kotlin code on android. You could always run your tests on an emulator (wouldn’t be dalvik tests). There probably exists better ways that don’t involve emulators that I’m not aware of
x

xenoterracide

01/29/2019, 10:22 PM
well for my compatibility issues, I’m mostly worried about the 3rd party libraries that I’m pulling in
a

Allan Wang

01/29/2019, 10:23 PM
For the most part if they use packages that are unavailable you’re probably going to get compile errors when building the app
x

xenoterracide

01/29/2019, 10:24 PM
right, but… not when I’m building the library… as it’s got its own build thing…
a

Allan Wang

01/29/2019, 10:24 PM
Yes so just create an android frame, include your library in gradle, and try building it