Hilt provides a standard way of Dagger Dependency injection to Android applications.
As some of us are already using Dagger2 for quite some time, most of them were facing a lot of issues while creating objects, dependency graphs, subcomponents creations, and their scoping and it is quite confusing if anyone uses it the first time.
Hilt came up with an approach to solve some of the problems, by using Hilt annotations will generate the dagger injection code into base classes.
Add below code snippet in project Gradle file
Add below code snippet in app/gradle
What motivated me to write this article despite having a lot of stuff on the internet regarding clean architecture?
A few months back when I want to understand clean architecture, I found a lot of articles on the internet, but those are a bit hard to understand and not clear as well. My main motive would be, it should be easy to understand and simple BTW
Let's jump into it:
There are so many discussions nowadays regarding clean architecture in Android, when your application is growing bigger you need to be more careful to manage it for future developments.