hilt
Installation
SKILL.md
Prerequisites
- Project MUST use Jetpack Compose as its UI toolkit.
- Project MUST be configured with Dagger Hilt for Dependency Injection.
- Project MUST use Kotlin Symbol Processing (KSP) or Kapt for incremental annotation processing.
1. Clean Architecture Boundaries
To preserve strict layer isolation in the project, Hilt dependencies must conform to the following architectural rules:
- The
:domainModule: This module must remain completely agnostic of Hilt, Dagger, or any Android framework classes (such asContext). No DI annotations are allowed in this module. All domain entities, use-case contracts, and repository interfaces are defined here purely. - The
:usecasesModule: Business use cases or interactors must resolve their domain repository dependencies purely via constructor injection using the@Injectannotation. They are not allowed to declare modules or access Android context. - The
:dataModule: This module contains repository implementations, network service adapters, and local databases. Hilt modules with@Bindsor@Providesreside here to wire repository interfaces to their concrete implementations. - The
:appModule: Serves as the central orchestrator (@HiltAndroidApp). Registers application-level Android entry points (@AndroidEntryPointor@HiltViewModel), and initializes system components like WorkManager and Firebase Cloud Messaging (FCM).