Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
View issue level access limits(Press Alt + Right arrow for more information)
Unintended behavior
View staffing
Description
Component used: room-runtime Version used: 2.6.1
I'm considering moving my
Dao
s to ajvm module
for simplicity but I have someDao
that takes aRoomDatabase
as a parameter wherein I need to instantiate otherDao
s in its implementation. I won't be able to do that sinceRoomDatabase
is in theroom-runtime
artifact which is anAndroid Library
.I tried using an
Interface
annotated with@Database
which is then implemented with RoomDatabase in an Android Library but the compiler throws an error requiring it to also implementRoomDatabase
I then tried to use the
Interface
as a parameter for theDao
but it throws an error since it is not aRoomDatabase
.This might be dumb but I'm trying to abstract most of my modules away from Android then have an Android/Platform specific module provide the necessary dependencies through dependency injection. Doing these could ease migrating to Kotlin Multiplatform.