Morfly / MultiModuleMovies

Multi-Module Movies is a The Movie DB project that demonstrates how to build a scalable multi-module architecture for Android apps that use Jetpack Compose.
MIT License
154 stars 24 forks source link

Can we use Hilt with this architecture #3

Closed vyshas closed 1 year ago

vyshas commented 2 years ago

Hi,

We are looking at an architecture very similar to this and one question where had doubts was will we be able to use Hilt properly with this architecture ?

AradiPatrik commented 1 year ago

He mentioned in his talk that this architecture is not really compatible with hilt. As I understood: Hilt uses @Submcomponent instead of component dependencies in it's implementation and that means that your implementation modules have to explicitly depend on other implementation and app modules using hilt. And that sort of defeats the purpose of this architecture.

Morfly commented 1 year ago

That's correct, the main issue lies in the fact that Hilt uses subcomponents under the hood, which in turn makes api-impl more challenging. Thank you @AradiPatrik for the reply!