gouline / kapsule

Minimalist Kotlin dependency injection
MIT License
164 stars 7 forks source link

Transitive dependencies #5

Closed gouline closed 7 years ago

gouline commented 7 years ago

With your solution, how would you manage the dependencies between modules?

For example, ModuleA exposes a retrofit (Retrofit.Builder().[…].build()) and ModuleB exposes the API by using this retrofit object (retrofit.create(MyApi::class.java)).

Should ModuleB implements Injects<ModuleA> or will you give someway ModuleA a reference to ModuleB?

I’ve checked the samples on GitHub but I can’t see the proper way to manage this.

Source: https://medium.com/@lcor1979/very-nice-solution-c4410253e712 (@lcor1979)

gouline commented 7 years ago

Implemented in version 0.3.