https://kotlinlang.org logo
Title
s

Stylianos Gakis

07/30/2022, 7:48 PM
I got an extra koin module in a separate gradle module which binds some extra implementations of an Interface like
single<MyInterfaceImpl1> { MyInterfaceImpl1() } bind MyInterface::class
I load that module using
loadKoinModules
which acts as a functions that populates the global koin registry. Then on another koin module I’m doing
single<SendHAnalyticsEventUseCase> {
  val allInterf = getAll<MyInterface>().distinct()
  Foo(allInterf)
}
However I figured that I am not getting those other interfaces on my getAll() and I am guessing this has to do with the order of how this is executed, as after I’ve added some Log.d in there it does fetch my other impls too 🤯 Is there a way to make this order more reliable or some approach where I can avoid this altogether? 🤔