When targeting Android, is it preferred to use 'jv...
# multiplatform
s
When targeting Android, is it preferred to use 'jvm' or 'android' as a target? From what I've read, 'jvm' seems to do the job, so any need to go native with the 'Android' target?
d
it depends if you need to access the android APIs in your multiplatform module or not, if you don't need them then
jvm
would probably be preferred
pure
jvm
modules should compile faster since they don't have to do any of the android specific build process
s
That's a good question. In phase 1 of my SDK, most if not all code will be common and consumed by potential clients (Android, iOS or even cross-platform (Xamarin, React Native, etc.)). However, there might be a phase 2 where some specific Android/iOS BLE implementations would be needed. So I guess that I would need to go the
android
way from the start to avoid a big refactoring?
k
it will be the same cost whether you do it now or later
d
yeah it shouldn't be much work to switch it later
s
Ok in that case I might start targeting
jvm
for the Android consumers of my SDK.