I'm writing a KMP UI framework that currently supp...
# multiplatform
j
I'm writing a KMP UI framework that currently supports Web, JVM SSR for web, Android, and iOS. I want to add a JVM Swing target. There are a ton of actuals/expects in my project; how would I do this? Can you have a separate Gradle project or module that implements the actuals for another project's expects?
r
expect and actual declarations need to live in the same module. You can just do
TODO()
implementations to start which will at least let you compile while building things out. If you want to be able to release things incrementally it gets harder.
e
unfortunately multiple JVM targets is not going to play well with that
j
That's what I was finding, but I had hope... Not sure how to move forward at this point on the library. This is a big issue for me.
r
If you can migrate from expect/actual declarations to interfaces, it gives a lot more flexibility. You could have a core module exposing interfaces and multiple JVM modules implementing those interfaces in different ways. Might be a big lift though depending on the existing API surface.