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

Matti MK

09/29/2021, 5:57 AM
Is there any established best practice thus far as to how data is passed from a shared module to native apps, let’s say in case of POJO from a network response? I’ve used to using Flows for pure Android development, the KMM prod sample uses a wrapper around the Flows (https://github.com/Kotlin/kmm-production-sample#native-ui), is this an approach to consider?
k

Konstantin Tskhovrebov

09/29/2021, 6:14 AM
https://github.com/terrakok/kmm-awesome Here are some useful libraries. E.g. see 'koru'
👍 1
m

Matti MK

09/29/2021, 7:17 AM
Thanks Konstantin, that’s an excellent resource! I’ve been looking KMM and on the side building a template app now for about two weeks, don’t know how I missed this great list 💪
Played around with Koru for a while but it didn’t seem to convince me: dependency on
kapt
appeared to cause more issues than I wanted, includig this one: https://youtrack.jetbrains.com/issue/KT-45545 Testing out the other options now 👍
m

Michal Klimczak

10/03/2021, 7:05 AM
Hey @Matti MK I'm the maintainer of Koru, will look into that. What's your use case for jdk 16 anyway?
Okay, read the youtrack issue, doesn't seem like something I can do other than ditch kapt (which I'm wrapping my head around for some time)
If you had any other issues, let me know
m

Matti MK

10/04/2021, 6:26 AM
@Michal Klimczak Thanks for your message! Otherwise everything worked great, except the
kapt
issues, sadly 😞. I’ve been playing around with KMM for a bit and to be honest, cannot remember the the why’s behind JDK16 anymore, I believe it was imposed/recommended by some other dependency along the way. I reverted back to just manually wrapping the flows, but it’s not a that great solution. I’ll give Koru another go later along the line to. Meanwhile, which JDK would you recommend to try it out with?
m

Michal Klimczak

10/04/2021, 6:29 AM
I'm using 11 with all my current android / kmm projects and it seems to be the current standard. Afair there is also difference between jdk version that you use for your buildscript and the one set to be used by the app and kapt only fails with the former set to 16, but don't quote me on that, I might have imagined it ;)
👌 1
m

Matti MK

10/04/2021, 6:30 AM
Gotcha, thanks for the great library, I really hope I can give it a proper try in a week or two 👍
m

Michal Klimczak

10/04/2021, 6:41 AM
sure, let me know if you have any issues
👍 1
2 Views