diff --git a/.idea/gradle.xml b/.idea/gradle.xml
index 3df99c92..2e7035fc 100644
--- a/.idea/gradle.xml
+++ b/.idea/gradle.xml
@@ -30,6 +30,9 @@
+
+
+
diff --git a/build-logic/convention/src/main/java/com/wap/wapp/plugin/AndroidFeatureConventionPlugin.kt b/build-logic/convention/src/main/java/com/wap/wapp/plugin/AndroidFeatureConventionPlugin.kt
index e1450498..0351a4eb 100644
--- a/build-logic/convention/src/main/java/com/wap/wapp/plugin/AndroidFeatureConventionPlugin.kt
+++ b/build-logic/convention/src/main/java/com/wap/wapp/plugin/AndroidFeatureConventionPlugin.kt
@@ -10,6 +10,7 @@ class AndroidFeatureConventionPlugin: Plugin{
with(pluginManager){
apply("com.wap.wapp.library")
apply("com.wap.wapp.compose")
+ apply("com.wap.wapp.hilt")
}
configureBinding()
}
diff --git a/build-logic/convention/src/main/java/com/wap/wapp/plugin/AndroidHiltPlugin.kt b/build-logic/convention/src/main/java/com/wap/wapp/plugin/AndroidHiltPlugin.kt
new file mode 100644
index 00000000..39aab5d6
--- /dev/null
+++ b/build-logic/convention/src/main/java/com/wap/wapp/plugin/AndroidHiltPlugin.kt
@@ -0,0 +1,23 @@
+package com.wap.wapp.plugin
+
+import org.gradle.api.Plugin
+import org.gradle.api.Project
+import org.gradle.api.artifacts.VersionCatalogsExtension
+import org.gradle.kotlin.dsl.dependencies
+import org.gradle.kotlin.dsl.getByType
+
+class AndroidHiltPlugin: Plugin {
+ override fun apply(target: Project) {
+ with(target){
+ pluginManager.apply("com.google.dagger.hilt.android")
+ pluginManager.apply("com.google.devtools.ksp")
+
+ val libs = extensions.getByType().named("libs")
+
+ dependencies {
+ "implementation"(libs.findLibrary("hilt").get())
+ "ksp"(libs.findLibrary("hilt.ksp").get())
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index d6bf8432..5ac83857 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -8,6 +8,7 @@ versionCode = "1"
gradleplugin = "8.1.2"
kotlin = "1.9.10"
+ksp = "1.9.10-1.0.13"
androidx-core = "1.12.0"
androidx-appcompat = "1.6.1"
@@ -34,9 +35,12 @@ junit = "4.13.2"
material = "1.9.0"
ktlint = "11.3.1"
+hilt = "2.48"
+
[libraries]
android-build = { module = "com.android.tools.build:gradle", version.ref = "gradleplugin" }
kotlin-gradle = { group = "org.jetbrains.kotlin", name = "kotlin-gradle-plugin", version.ref = "kotlin" }
+hilt-gradle = { group = "com.google.dagger", name = "hilt-android-gradle-plugin", version.ref = "hilt" }
kotlin = { group = "org.jetbrains.kotlin", name = "kotlin-stdlib", version.ref = "kotlin" }
@@ -69,6 +73,10 @@ firebase-crashlytics = { module = "com.google.firebase:firebase-crashlytics-ktx"
firebase-auth = { module = "com.google.firebase:firebase-auth-ktx" }
firebase-firestore = { module = "com.google.firebase:firebase-firestore-ktx" }
+hilt = { module = "com.google.dagger:hilt-android", version.ref = "hilt" }
+hilt-ksp = { module = "com.google.dagger:hilt-compiler", version.ref = "hilt" }
+hilt-plugin = { group = "com.google.dagger", name = "hilt-android-gradle-plugin", version.ref = "hilt" }
+
junit = { module = "junit:junit", version.ref = "junit" }
androidx-test-junit = { module = "androidx.test.ext:junit", version.ref = "androidx-test-junit" }
androidx-test-espresso = { module = "androidx.test.espresso:espresso-core", version.ref = "androidx-test-espresso" }
@@ -102,6 +110,8 @@ compose = [
android-application = { id = "com.android.application", version.ref = "gradleplugin" }
android-library = { id = "com.android.library", version.ref = "gradleplugin" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
+ksp = { id = "com.google.devtools.ksp", version.ref = "ksp" }
google-services = { id = "com.google.gms.google-services", version.ref = "google-services-plugin" }
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "google-crashlytics-plguin" }
+dagger-hilt = { id = "com.google.dagger.hilt.android", version.ref = "hilt" }
ktlint = { id = "org.jlleitschuh.gradle.ktlint", version.ref = "ktlint" }