Is there any way to create a module(kodein one) and put inside binds of different modules(android ones)?
For instance, I have different modules(android ones) on my app, and when I was not using modules (android ones).
An example would be :
app module (android)
inside I can have the DI of Presenter of one feature
data module (android)
inside I can have the DI of some repositoryImpl
When I was not using modules(android ones) I was doing it in the same feature package, but now that I've split the things how can I manage it?
i
ian.shaun.thomas
11/15/2019, 2:15 PM
Unless I'm not understanding the question, best way to do that would be sourcesets. Have a sourceset for each platform that defines some common module name that you import in your common code.
r
romainbsl
11/15/2019, 7:29 PM
What's a kodein module vs Android module?
j
Joan Colmenero
11/15/2019, 9:55 PM
I mean with the clean architecture in android they are creating modules like "app" "data" "domain", but I guess this is more Android related than Kodein.... So sorry then 😄
I was trying to understand what's the better way to do that, and if it's possible to create a module, and then add more binds to it.
Pseudo :
Copy code
val myModule = Kodein.Module("feature1Module"){
<bind>....
<bind>...
}
Then in other module of the app or let's say in another class put more binds to the same module. I guess this question is more reasonable to ask here...