Skip to content

Instantly share code, notes, and snippets.

@imashnake0
Last active May 9, 2022 22:14
Show Gist options
  • Save imashnake0/1f6bdc2b354b5d74a4a22460f972346d to your computer and use it in GitHub Desktop.
Save imashnake0/1f6bdc2b354b5d74a4a22460f972346d to your computer and use it in GitHub Desktop.
Adding Hilt dependencies (2.41+)
plugins {
// ...
// Put `kapt` below the plugin.
id("com.google.dagger.hilt.android")
kotlin("kapt")
}
android {
// ...
}
kapt {
correctErrorTypes = true
}
dependencies {
// ...
// Hilt
implementation("com.google.dagger:hilt-android:2.4x")
kapt("com.google.dagger:hilt-compiler:2.4x")
}
plugins {
// ...
id("com.google.dagger.hilt.android") version "2.4x" apply false
}
@imashnake0
Copy link
Author

imashnake0 commented Apr 19, 2022

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment