I've had a look at the multiplatform overview, but...
# multiplatform
c
I've had a look at the multiplatform overview, but I'm confused where android sits compared to desktop - jvmMain sounds like it could target both, but they're very different beasts (at least in the sense android consumes AARs and produces resources etc)
How would I go about creating a library for example that had android specific and desktop specific implementations?
j
Android can consume most jvm .jar artifacts (with some exceptions if non-Android jvm APIs are used). If Android-specific APIs or .aar features, like resources, are required, then an Android-specific target is required. Depending which requirement your KMP library has, you could target either
jvm()
,
android()
, or both. You could have a shared parent source set between both targets as well.
c
cheers Jeff, wish me luck