Koin sharing instances between modules
问题 I'm using the Koin library for an Android project. I want to share some instances between modules since they are used a lot throughout the application. For instance: val moduleA = module { scope(named<FragmentA>()) { scoped { FirebaseFirestore.getInstance() } scoped { LocalDatabase.getInstance(App.sContext) } scoped { NetworkDataSourceA(get()) } } } val moduleB = module { scope(named<FragmentB>()) { scoped { FirebaseFirestore.getInstance() } scoped { LocalDatabase.getInstance(App.sContext) }