Setting Up Hilt
Add Hilt and the application component.
Adding Hilt to a Project
Hilt needs a Gradle plugin and dependencies, plus an annotation processor (KSP or kapt). Setup is one-time per project.
Gradle Plugin
Apply the Hilt plugin in your module build file alongside KSP.
// module build.gradle.kts
plugins {
id("com.google.dagger.hilt.android")
id("com.google.devtools.ksp")
}