Import and setup Hilt for dependency injection

Considering we will be having a room database instance soon for downloads
and already have tons of other instances everywhere, feels right time to
use Hilt to manage them to avoid more memory leaks.

Signed-off-by: Aayush Gupta <aayushgupta219@gmail.com>
This commit is contained in:
Aayush Gupta
2023-12-04 11:13:37 +05:30
parent 61f030d124
commit 7420c96b86
72 changed files with 160 additions and 37 deletions

View File

@@ -29,6 +29,7 @@ plugins {
id("androidx.navigation.safeargs.kotlin")
id("org.jlleitschuh.gradle.ktlint")
id("dev.rikka.tools.refine")
id("com.google.dagger.hilt.android")
}
kotlin {
@@ -187,6 +188,11 @@ dependencies {
//WorkManager
implementation("androidx.work:work-runtime-ktx:2.9.0")
//Hilt
val hiltVersion = "2.49"
ksp("com.google.dagger:hilt-android-compiler:$hiltVersion")
implementation("com.google.dagger:hilt-android:$hiltVersion")
// LeakCanary
debugImplementation("com.squareup.leakcanary:leakcanary-android:2.12")
}