https://kotlinlang.org logo
#multiplatform
Title
# multiplatform
r

Robert

12/11/2018, 8:17 PM
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

Ruckus

12/11/2018, 8:22 PM
That is on purpose. You can only use common code in common code. Java code is specific to the JVM platform.
👍 3
r

Robert

12/11/2018, 8:24 PM
Thank you, that makes sense. So we need lots of multiplatform (=mpp?) libs then. That's a challenge
r

Ruckus

12/11/2018, 8:35 PM
Depends on your use case, but that is indeed one of the big drives right now.
r

Robert

12/11/2018, 8:36 PM
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

serebit

12/11/2018, 8:42 PM
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

goncalossilva

12/11/2018, 11:03 PM
@Robert JetBrains maintains a few, notably: • kotlinx-io • kotlinx-serialization • kotlinx-coroutines • ktor
k

kpgalligan

12/11/2018, 11:30 PM
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

goncalossilva

12/12/2018, 12:57 AM
@kpgalligan Awesome list 👏