build: add dagger hilt
authorDa Risk <da_risk@geekorum.com>
Wed, 10 Jun 2020 20:55:39 -0400
changeset 717 51c6ab8f66c5
parent 708 2310bbec28e3
child 718 dce96fd1d9f7
build: add dagger hilt
app/build.gradle.kts
build.gradle.kts
gradle.properties
settings.gradle.kts
--- a/app/build.gradle.kts	Fri Jun 05 16:53:10 2020 -0400
+++ b/app/build.gradle.kts	Wed Jun 10 20:55:39 2020 -0400
@@ -37,6 +37,7 @@
     id("com.geekorum.build.android-release-universal-apk")
     id("com.geekorum.build.play-store-publish")
     id("androidx.navigation.safeargs.kotlin")
+    id("dagger.hilt.android.plugin")
 }
 
 android {
@@ -177,6 +178,10 @@
     kaptTest("com.google.dagger:dagger-android-processor:$daggerVersion")
     implementation("com.squareup.inject:assisted-inject-annotations-dagger2:0.5.2")
     kapt("com.squareup.inject:assisted-inject-processor-dagger2:0.5.2")
+    val hiltVersion = "2.28-alpha"
+    implementation("com.google.dagger:hilt-android:$hiltVersion")
+    kapt("com.google.dagger:hilt-android-compiler:$hiltVersion")
+
 
     val roomVersion = "2.2.0"
     kapt("androidx.room:room-compiler:$roomVersion")
--- a/build.gradle.kts	Fri Jun 05 16:53:10 2020 -0400
+++ b/build.gradle.kts	Wed Jun 10 20:55:39 2020 -0400
@@ -37,6 +37,7 @@
     id("com.google.firebase.crashlytics") apply false
     id("com.google.gms.google-services") apply false
     id("com.google.android.gms.oss-licenses-plugin") apply false
+    id("dagger.hilt.android.plugin") apply false
 }
 
 
--- a/gradle.properties	Fri Jun 05 16:53:10 2020 -0400
+++ b/gradle.properties	Wed Jun 10 20:55:39 2020 -0400
@@ -24,6 +24,7 @@
 crashlyticsVersion=2.1.0
 googleServicesVersion=4.3.3
 ossLicensesVersion=0.10.0
+hiltVersion=2.28-alpha
 
 # specify path of geekdroid source to use them instead of the prebuilt library
 # GEEKDROID_PROJECT_DIR=/home/darisk/devel/geekorum/geekdroid/
--- a/settings.gradle.kts	Fri Jun 05 16:53:10 2020 -0400
+++ b/settings.gradle.kts	Wed Jun 10 20:55:39 2020 -0400
@@ -25,6 +25,7 @@
     val crashlyticsVersion: String by settings
     val googleServicesVersion: String by settings
     val ossLicensesVersion: String by settings
+    val hiltVersion: String by settings
 
     plugins {
         kotlin("android") version kotlinVersion
@@ -35,6 +36,7 @@
         id("com.google.firebase.crashlytics") version crashlyticsVersion
         id("com.google.gms.google-services") version googleServicesVersion
         id("com.google.android.gms.oss-licenses-plugin") version ossLicensesVersion
+        id("dagger.hilt.android.plugin") version hiltVersion
     }
 
     repositories {
@@ -54,6 +56,7 @@
                 "com.google.gms.google-services" -> useModule("com.google.gms:google-services:${googleServicesVersion}")
                 "com.google.firebase.crashlytics" -> useModule("com.google.firebase:firebase-crashlytics-gradle:${crashlyticsVersion}")
                 "androidx.navigation.safeargs.kotlin" -> useModule("androidx.navigation:navigation-safe-args-gradle-plugin:${androidxNavigationVersion}")
+                "dagger.hilt.android.plugin" -> useModule("com.google.dagger:hilt-android-gradle-plugin:${hiltVersion}")
             }
         }
     }