When using Koin annotations. Is it possible using ...
# koin
j
When using Koin annotations. Is it possible using module scan to declare all modules in app module scanning all child modules? Or do I have to create a @Module inside all modules and consume them from app where load modules?
s
I don’t know if koin will auto discover child modules via scanning. But i usually manually register child modules like this -
@Module(includes = [MyChildModule::class]
j
Yeah it didnt work using includes. It was so bad I went back to Hilt. I dont have time investigate or wait for koin supporting this. To bad.
I think similar to installIn(SingletonComponent) needed in Koin annotations. But also its same as dagger soon so.
s
Or do I have to create a @Module inside all modules and consume them from app where load modules?
Oh are you talking about gradle modules? If yes, it's something I ran into here