Hello guys, i’m working on a compose multiplatform...
# multiplatform
k
Hello guys, i’m working on a compose multiplatform app and i’ve encoutered this seemingly common issue https://github.com/JetBrains/compose-multiplatform/issues/3437 , this only happens when adding the sqldelight plugin to a compose multiplatform project. (kotlin 1.9.21) and there seems to be no solution yet ! i need this fixed asap or any suggestions for an alternative local database multiplatform library ? thanks
p
If you are not covering js target you could try realmdb or couchbase. This is a couchbase KMP wrapper: https://github.com/jeffdgr8/kotbase
1
k
Thanks ! going for couchbase as temporary solution !
👍 1
p
The main maintainer Jeff is very active in this workspace.
❤️ 1
e
It;s very strange, I am using SQLdelight for both iOS and Android without a problem. And I can not see big difference with your configuration
k
This happens particularly in compose multiplatform projects, i also have sqldelight in other kmp projects without shared UI and no issues found with that.
e
But I am sharing UI too
k
strange 😞 and the solution to the issue doesn’t look obvious ! i don’t have time to search further ! i have deadlines
😔 1
e
Are you using dependency injection?
p
I believe there was an issue when mixing SQLDelight in the same shared module. If you use a separate module works fine. Also the SQLDelight plugin needs to be applied to the root gradle project and specify the version there. You can keep digging into it, I have a couple of projects using SQLDelight and they work fine. However, if you are limited in time, realmdb or couchbase will be faster imo, due to the nature of SQL vs nosql
k
@Enol Simón i’m still configuring the project and yes i’m using Koin but it is not related to the issue since it appeared before integrating koin, @Pablichjenkov i think i should try adding it in the root project instead and see what happens !
👍 1
p
Yes, specify the version either there or in settings.gradle if you are adding the plugins using settings.gradle.