Thread
#multiplatform
    j

    Jeff Tycz

    1 year ago
    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

    Andrew

    1 year ago
    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.
    Kurt Renzo Acosta

    Kurt Renzo Acosta

    1 year ago
    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.
    mbonnin

    mbonnin

    1 year ago
    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
    Kurt Renzo Acosta

    Kurt Renzo Acosta

    1 year ago
    I’ve never experienced issues on my end though. I’ve been having the same setup for over a year
    mbonnin

    mbonnin

    1 year ago
    Is your project open source by any chance @Kurt Renzo Acosta ? Maybe there's something we're doing that confuses IntelliJ
    Kurt Renzo Acosta

    Kurt Renzo Acosta

    1 year ago
    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
    mbonnin

    mbonnin

    1 year ago
    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