Hello, let's say we have 3 modules: domain, data and app. App depends on data and domain, data depends on domain, domain has no dependencies on other project modules. I create repository interface in domain module and implementation in data module, but remember that domain module doesn't depend on data module.
I managed to do it with hilt: https://github.com/gufeczek/dagger-ioc-test/tree/main
Is it possible to do it with koin, preferable with annotations?
@Pedro Alberto I think this doesn't concern my problem. To include data module in my domain module I would need to have dependency on data module in my domain build.gradle file.
What I want to achieve is to not depend on other projects modules in my domain module. It's possible in hilt but I'm not sure it's possible with koin.
i
IgnacioCarrion
01/04/2025, 1:28 PM
I think that you can do it with the same structure you did in your example with Hilt. The repository implementation and the Module for Koin should be on the data module. What problem are you facing?
👍 4
g
gufeczek
01/04/2025, 2:08 PM
@IgnacioCarrion Thank you, it works now. I tried to define class with @Module annotation in domain, but it's not needed.