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.
With your solution, how would you manage the dependencies between modules?
For example,
ModuleA
exposes a retrofit (Retrofit.Builder().[…].build()
) andModuleB
exposes the API by using this retrofit object (retrofit.create(MyApi::class.java)
).Should
ModuleB
implementsInjects<ModuleA>
or will you give somewayModuleA
a reference toModuleB
?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)