is it possible to target android with a multiplatf...
# multiplatform
j
is it possible to target android with a multiplatform library without dragging in a lot of build dependencies? I have most platforms supported at this point but it seems android is a bit special in that it needs a crapload of android specific configuration, sdks, plugins, and what not. IOS seems straightforward in comparison. I don't actually develop any android stuff, I just want android people to be able to use my library.
https://github.com/jillesvangurp/json-dsl/blob/main/build.gradle.kts This is the build file for my project. I've commented out the android bits.
o
If you don’t need to access Android specific APIs, you don’t need to declare Android target - jvm will be enough
☝️ 1
👍 1
j
If you need an example: I have a library for Android/iOS/web but only target JVM to make it work on Android. https://github.com/jacobras/Human-Readable/blob/main/build.gradle.kts
j
right, that's helpful. None of my libraries don't use any android stuff.
the documentation is a bit sparse and hand wavy on this