diff --git a/app/build.gradle b/app/build.gradle index a6f8ea3579598267c9d86b815e556d95127c55db..9d65b3bee07314f2abac700b6045ba323423ac69 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -1,6 +1,8 @@ apply plugin: 'com.android.application' apply plugin: 'org.jetbrains.kotlin.android' apply plugin: 'androidx.navigation.safeargs.kotlin' +apply plugin: 'kotlin-kapt' +apply plugin: 'dagger.hilt.android.plugin' android { compileSdk rootProject.ext.sdkVersion @@ -94,12 +96,21 @@ dependencies { //Log implementation 'com.jakewharton.timber:timber:5.0.1' + //Hilt + def hilt = "2.45" + implementation "com.google.dagger:hilt-android:$hilt" + kapt "com.google.dagger:hilt-compiler:$hilt" + //test testImplementation 'junit:junit:4.13.2' androidTestImplementation 'androidx.test.ext:junit:1.1.5' androidTestImplementation 'androidx.test.espresso:espresso-core:3.5.1' } +kapt { + correctErrorTypes = true +} + if (getGradle().getStartParameter().getTaskRequests().toString().toLowerCase().contains("gplay")) { apply plugin: 'com.google.gms.google-services' apply plugin: 'com.google.firebase.crashlytics' diff --git a/build.gradle b/build.gradle index d28a92619324259e29216be6e2c1b8576cc68fb3..a4f6be95b22861949d9ac447a6f7ee3f20b0c960 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,7 @@ buildscript { classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$androidx_nav_version" classpath 'com.google.gms:google-services:4.3.15' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.5' + classpath 'com.google.dagger:hilt-android-gradle-plugin:2.45' } }