Is there any official guide to add room in a compo...
# room
p
Is there any official guide to add room in a compose multiplatform project? this is the only official doc I found, but it's not complete, it doesn't help you too much. A step by step guide is necessary.
o
You can take inspiration from my project which use it https://github.com/opatry/taskfolio
you have the
:tasks-core
module which defines Dao and only rely on Room API then
:tasks-shared
creates the DB et inject it. There is Android & Jvm/Desktop injection, shouldn't be that hard to adjust for another platform like iOS which is documented.
let me know if you have specific questions
p
thank you but it is very complex project with a lot of content and also uses shared module, and the web wizard for multiplatform still doesn't generate projects with shared module, it still generate composeApp module with desktop/android targets inside. So your solution can't be applyed to a simple small project without share module easily
the idea is to find a official documentation with a step by step guide for adding rom to a compose multiplatform app
m
We also have this https://developer.android.com/training/data-storage/room/room-kmp-migration And a codelab with more handheld approach goo.gle/kmp-migrate-room-codelab But yeah, it would benefit from some cleaning up 😁