Hi, I'm new. I am trying to build a multiplatform ...
# multiplatform
r
Hi, I'm new. I am trying to build a multiplatform project, but I can't see to use native Java classes in the common code. Is this on purpose or is this an error in my project setup?
r
That is on purpose. You can only use common code in common code. Java code is specific to the JVM platform.
👍 3
r
Thank you, that makes sense. So we need lots of multiplatform (=mpp?) libs then. That's a challenge
r
Depends on your use case, but that is indeed one of the big drives right now.
r
Well, migrating an existing project to Kotlin multiplatform. But well, it was already to hard to believe I could just use the existing Java sources lol, that would be like a miracle.
I guess I'll join the effort 💪
🤘 3
Is there a lits of all available multiplatform libs?
s
I’m working on a couple multiplatform projects at the moment myself. I’ve made it a practice to write as much code in the common module as possible, even if the project only has a JVM module at the time
g
@Robert JetBrains maintains a few, notably: • kotlinx-io • kotlinx-serialization • kotlinx-coroutines • ktor
k
SQLiter: https://github.com/touchlab/SQLiter (native-side driver for sqldelight and others)
Stately: https://github.com/touchlab/Stately Utilities for multiplatform and native state/concurrency
I am updating Droidcon/Sessionize app tonight (ish) to show a bunch of these in a production app. There have been issues because all Jetbrains' libraries are gradle 4.7 and the ones from Touchlab (aka me) and Sqldelight are gradle 4.10, which is what Android 3.3 requires
There are several more, but this is primarily what I've been wrestling with lately and haven't had to chance to try them out
Also, sqliter and stately docs are old. Training up some devs internally on Kotlin native and trying to get them to update docs, but takes time...
g
@kpgalligan Awesome list 👏