gradle project
classpath 'com.google.dagger:hilt-android-gradle-plugin:<version>'
gradle application
apply plugin: 'dagger.hilt.android.plugin'
dependencies{
implementation 'com.google.dagger:hilt-android:<VERSION>'
kapt 'com.google.dagger:hilt-android-compiler:<VERSION>'
// For instrumentation tests
androidTestImplementation 'com.google.dagger:hilt-android-testing:<VERSION>'
kaptAndroidTest 'com.google.dagger:hilt-android-compiler:<VERSION>'
// For local unit tests
testImplementation 'com.google.dagger:hilt-android-testing:<VERSION>'
kaptTest 'com.google.dagger:hilt-android-compiler:<VERSION>'
}
kapt {
correctErrorTypes true
}