When defining a custom module, ex: `@Module class...
# koin
m
When defining a custom module, ex:
@Module class LibModule
how can I instruct Koin to place all the generated definitions (when using @Single, @Factory) in that module? currently all my definitions end up in the
defaultModule
. thanks!
1
p
In that case when defining the @Module you should use @ComponentScan(my.lib.package.name) place the package name of your Lib I assume. Also in build gradle you can disable the default module to be generated saving you compile time 😉 Please refer to documentation https://insert-koin.io/docs/reference/koin-annotations/start https://insert-koin.io/docs/reference/koin-annotations/modules
m
@Pedro Alberto great, thanks a lot!