I tried to implement Realm on Android side of the ...
# multiplatform
p
I tried to implement Realm on Android side of the MPP but it seems like
kapt
is not working properly.
g
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
same. Used kapt with room on android side. You need kotlin-android for kapt to work, which does not work with multiplatform plugin.
k
Not to be “that guy”, but try sqldelight. Sample app https://link.medium.com/qRCAL4ajMS
😁 1
i
@kpgalligan it would be cooler if you gave community the rx or pure JsonObject(w/o reflection) implementations, but thanks for db anyway)
k
rx, as in rxjava? Not sure what you mean by "pure JsonObject".
Not sure how any of that compares to db functionality
i
@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
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
@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
Just curious, what exactly do they generate?
p
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.