Skip to content

Commit

Permalink
Add dagger hilt
Browse files Browse the repository at this point in the history
  • Loading branch information
meiron03 committed Feb 24, 2025
1 parent 0f89a83 commit 4bcb1fc
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 0 deletions.
13 changes: 13 additions & 0 deletions PennMobile/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ plugins {
alias(libs.plugins.firebase.crashlytics)
id 'jacoco'
id 'kotlin-parcelize'
id 'com.google.dagger.hilt.android'
id 'kotlin-kapt'
}

android {
Expand All @@ -31,6 +33,10 @@ android {
kotlinOptions {
jvmTarget = "1.8"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
defaultConfig {
minSdkVersion 26
targetSdkVersion 34
Expand Down Expand Up @@ -107,9 +113,16 @@ dependencies {
implementation libs.bundles.ui
implementation libs.bundles.google

implementation libs.hilt.android
kapt libs.hilt.compiler

testImplementation libs.junit
}

kapt {
correctErrorTypes true
}

String getPlatformClientID() {
def propFile = rootProject.file("./local.properties")
def properties = new Properties()
Expand Down
1 change: 1 addition & 0 deletions PennMobile/src/main/res/layout/activity_main.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<androidx.drawerlayout.widget.DrawerLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/drawer_layout"
android:background="@color/white"
android:layout_width="match_parent"
android:layout_height="match_parent">

Expand Down
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,6 @@ plugins {
alias(libs.plugins.kotlin.android) apply false
alias(libs.plugins.google.services) apply false
alias(libs.plugins.firebase.crashlytics) apply false
alias(libs.plugins.dagger.hilt) apply false

}
6 changes: 6 additions & 0 deletions gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ retrofit = "2.9.0"
rxandroidVersion = "1.2.1"
rxjava1 = "1.3.8"
testng = "7.8.0"
hilt-android = "2.51.1"
hilt-compiler = "2.51.1"
dagger-hilt = "2.51.1"

[libraries]

Expand Down Expand Up @@ -123,12 +126,15 @@ reactivex-rxandroid = { module = "io.reactivex:rxandroid", version.ref = "rxandr
retrofit = { module = "com.squareup.retrofit2:retrofit", version.ref = "retrofit" }
rxjava = { module = "io.reactivex:rxjava", version.ref = "rxjava1" }
testng = { module = "org.testng:testng", version.ref = "testng" }
hilt-android = { module = "com.google.dagger:hilt-android", version.ref = "hilt-android"}
hilt-compiler = { module = "com.google.dagger:hilt-compiler", version.ref = "hilt-compiler"}

[plugins]
android-application = { id = "com.android.application", version.ref = "agp" }
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
google-services = { id = "com.google.gms.google-services", version.ref = "googleServices"}
firebase-crashlytics = { id = "com.google.firebase.crashlytics", version.ref = "firebaseCrashalytics"}
dagger-hilt = { id = "com.google.dagger.hilt.android", version.ref = "dagger-hilt"}


[bundles]
Expand Down

0 comments on commit 4bcb1fc

Please sign in to comment.