feat: server-handled routes and stops
This commit is contained in:
parent
efba64ea90
commit
58ee095522
61 changed files with 1634 additions and 349 deletions
|
|
@ -7,6 +7,9 @@ val CommonModules = module {
|
|||
includes(PlatformModule)
|
||||
|
||||
single { Database.build(get<PlatformDatabaseBuilder>().getBuilder()) }
|
||||
single { get<Database>().getRouteDao() }
|
||||
single { get<Database>().getShapeDao() }
|
||||
single { get<Database>().routeDao }
|
||||
single { get<Database>().shapeDao }
|
||||
single { get<Database>().stopDao }
|
||||
single { get<Database>().stopTimeDao }
|
||||
single { get<Database>().tripDao }
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@ package moe.lava.banksia.di
|
|||
|
||||
import androidx.room.RoomDatabase
|
||||
import moe.lava.banksia.room.Database
|
||||
import org.koin.core.module.Module
|
||||
import org.koin.core.parameter.ParametersHolder
|
||||
import org.koin.core.scope.Scope
|
||||
import org.koin.dsl.module
|
||||
|
|
@ -12,6 +13,9 @@ interface PlatformDatabaseBuilder {
|
|||
|
||||
expect fun Scope.provideDatabaseBuilder(p: ParametersHolder): PlatformDatabaseBuilder
|
||||
|
||||
internal expect val ExtPlatformModule: Module
|
||||
|
||||
internal val PlatformModule = module {
|
||||
includes(ExtPlatformModule)
|
||||
single { provideDatabaseBuilder(it) }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue