Manuel Lorenzo
01/12/2020, 6:57 PMval databaseModule = module {
single { HeritageDatabase.getDatabase(get()) }
single { get<HeritageDatabase>().heritageDao() }
}
diesieben07
01/13/2020, 8:39 AMsingle
has a parameter called createdAtStart
, which is false
by default. However I would argue that this is abusing DI. Dependency definitions (like single
) shouldn't really have side-effects like that.