Hi guys i’m working on a kmm project with multi mo...
# multiplatform
a
Hi guys i’m working on a kmm project with multi modules and i’m using sqldelight for db. What i want to do is be able to add module only sq files and tables and i kind a achive this by adding this gradle lines to new module
Copy code
sqldelight {
    database("AppDatabase") {
        packageName = "com.myapp.shome"
        sourceFolders = listOf("sqldelight")
        dialect = "sqlite:3.24"
        dependency(project(":xDatabase"))
    }
}
xDataBase project looks like this
Copy code
sqldelight {
    database("AppDatabase") {
        packageName = "com.myapp.xdatabase"
        sourceFolders = listOf("sqldelight")
        dialect = "sqlite:3.24"
    }
}
when i add xDatabase as a dependency to the sqldelight it creates a new AppDatabase interface which implements the xdatabase.AppDatabase wich is nice. But the problem i should inject this db class to my datasources and i already added AppDatabase to my koin object graph
Copy code
single {
    AppDatabase(DatabaseDriverFactory(get()).createDriver())
} bind AppDatabase::class
so now im not sure how to add the new generated AppDatabase to koin graph