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

pandawarrior

12/19/2018, 11:48 AM
I tried to implement Realm on Android side of the MPP but it seems like
kapt
is not working properly.
g

gildor

12/19/2018, 12:40 PM
What is doesn't work?
Also nut sure that Real needa kapt, I thought that it's runtime only library or am I wrong?
i

Ivan

12/19/2018, 2:41 PM
same. Used kapt with room on android side. You need kotlin-android for kapt to work, which does not work with multiplatform plugin.
k

kpgalligan

12/19/2018, 3:34 PM
Not to be “that guy”, but try sqldelight. Sample app https://link.medium.com/qRCAL4ajMS
😁 1
i

Ivan

12/19/2018, 4:18 PM
@kpgalligan it would be cooler if you gave community the rx or pure JsonObject(w/o reflection) implementations, but thanks for db anyway)
k

kpgalligan

12/19/2018, 4:19 PM
rx, as in rxjava? Not sure what you mean by "pure JsonObject".
Not sure how any of that compares to db functionality
i

Ivan

12/19/2018, 4:22 PM
@kpgalligan yes, like rx java, rx swift and other rx implementations. JsonObject and JSONArray in java. This is not compares to db, just would be cool to see those things on k/n platform
k

kpgalligan

12/19/2018, 4:23 PM
Oh, well, I wouldn't expect a reactive library until multithreaded coroutines emerge. The droidcon app does have an example of running a task in the background and pushing that data to the foreground, and I'll more the api to look "reactive-like", but it won't be "rx", and any work on it will be pointless once MT coroutines come around
As for json, no idea what you're saying. That's kotlinx-serialization
You can do that now, unless I'm missing something
p

pandawarrior

12/20/2018, 1:10 AM
@gildor basically
apply plugin: 'kotlin-kapt'
in the build.gradle file before
apply plugin: 'realm-android'
. Realm is using it generate codes. I got around it… by using Java. 😛
g

gildor

12/20/2018, 1:22 AM
Just curious, what exactly do they generate?
p

pandawarrior

12/20/2018, 2:55 AM
DefaultRealmModule.java DefaultRealmModuleMediator.java org_example_app_realm_RealmSampleDataRealmProxy.java org_example_app_realm_RealmSampleDataRealmProxyInterface.java Boilerplate codes that made modern development looks like magic on the outside.
Tried sqldelight 1.0.0-rc4, can’t even apply the plugin.
kotlin.KotlinNullPointerException
on Gradle sync.
12 Views