Hopefully this isn't a silly question but is it po...
# multiplatform
j
Hopefully this isn't a silly question but is it possible to for a non-multiplatform Android app to use a multiplatform library? My intention is to have a library that can be used for both non-multiplatform projects and multiplatform projects. Is this even possible?
a
Not sure what you mean on the last part of your question. But a multiplatform library produces outputs on each target you specify, if one is Java then Android can use it just like any other Java library.
k
Definitely. My setup is heavily modularized so i have a shared multiplatform modules and platform specific modules. Some multiplatform modules use other multiplatform modules which are also used by the platform specific modules as needed.
👍 1
m
That works well except IDE support has been very flaky in my experience if both the multiplatform lib and Android app are in the same project. I've seen cases where symbols where not resolved
true story 1
k
I’ve never experienced issues on my end though. I’ve been having the same setup for over a year
m
Is your project open source by any chance @Kurt Renzo Acosta ? Maybe there's something we're doing that confuses IntelliJ
k
sadly, no. as much as i’d love to share them, they’re proprietary projects. i’ve seen in your reproducer and i might’ve misunderstood the problem. my setup is multiplatform modules consuming other own multiplatform modules and platform specific modules consuming other multiplatform modules. it works in Android and iOS but I haven’t tried it with a JVM
m
I've had some success consuming
android
multiplatform targets from a non-multiplatform Android app module in https://github.com/HearthSim/Arcane-Tracker. But looks like it doesn't work when consuming
jvm
multiplatform targets