Skip to content

Commit 7ab84a6

Browse files
update catalog and gradle for hilt
1 parent 215d996 commit 7ab84a6

File tree

4 files changed

+13
-4
lines changed

4 files changed

+13
-4
lines changed

Diff for: Tutorial3-1Navigation/build.gradle.kts

+6
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ plugins {
44
alias(libs.plugins.compose)
55
alias(libs.plugins.kotlin.parcelize)
66
alias(libs.plugins.jetbrains.kotlin.serialization)
7+
alias(libs.plugins.hilt)
8+
alias(libs.plugins.ksp)
79
id("kotlin-parcelize")
810
}
911

@@ -53,8 +55,12 @@ dependencies {
5355
implementation(libs.androidx.compose.material)
5456
implementation(libs.androidx.compose.material3)
5557
implementation(libs.androidx.navigation.compose)
58+
implementation(libs.androidx.hilt.navigation.compose)
59+
implementation(libs.hilt.android)
5660
implementation(libs.kotlinx.serialization.json)
5761

62+
ksp(libs.hilt.compiler)
63+
5864
testImplementation(libs.junit)
5965
androidTestImplementation(libs.androidx.junit.v121)
6066
androidTestImplementation(libs.androidx.espresso.core.v361)

Diff for: Tutorial3-1Navigation/src/main/AndroidManifest.xml

+1
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
android:allowBackup="true"
66
android:icon="@mipmap/ic_launcher"
77
android:label="@string/app_name"
8+
android:name=".NavigationApplication"
89
android:roundIcon="@mipmap/ic_launcher_round"
910
android:supportsRtl="true"
1011
android:theme="@style/Theme.ComposeTutorials">

Diff for: build.gradle.kts

+2
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,6 @@ plugins {
66
alias(libs.plugins.kotlin.parcelize) apply false
77
alias(libs.plugins.compose) apply false
88
alias(libs.plugins.jetbrains.kotlin.serialization) apply false
9+
alias(libs.plugins.ksp) apply false
10+
alias(libs.plugins.hilt) apply false
911
}

Diff for: gradle/libs.versions.toml

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ coroutines = "1.8.1"
4040
espressoCore = "3.6.1"
4141
google-maps = "19.0.0"
4242
gradle-versions = "0.51.0"
43-
hilt = "2.51.1"
43+
hilt = "2.52"
4444
# @pin When updating to AGP 7.4.0-alpha10 and up we can update this https://developer.android.com/studio/write/java8-support#library-desugaring-versions
4545
jdkDesugar = "2.1.2"
4646
junit = "4.13.2"
@@ -52,7 +52,7 @@ kotlin = "2.0.10"
5252
kotlinTest = "1.8.22"
5353
kotlinx_immutable = "1.8.1"
5454
kotlinxCoroutinesTest = "1.8.1"
55-
ksp = "2.0.0-1.0.21"
55+
ksp = "2.0.20-1.0.25"
5656
lifecycleRuntimeCompose = "2.8.6"
5757
lifecycleRuntimeKtx = "2.8.6"
5858
maps-compose = "3.1.1"
@@ -110,9 +110,7 @@ androidx-compose-ui-text = { module = "androidx.compose.ui:ui-text" }
110110
androidx-compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling" }
111111
androidx-compose-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview" }
112112
androidx-compose-ui-util = { module = "androidx.compose.ui:ui-util" }
113-
androidx-compose-ui-viewbinding = { module = "androidx.compose.ui:ui-viewbinding" }
114113
androidx-constraintlayout-compose = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "androidx-constraintlayout" }
115-
androidx-constraintlayout-compose-v110alpha14 = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "constraintlayoutCompose" }
116114
androidx-core-ktx = { module = "androidx.core:core-ktx", version.ref = "androidx-corektx" }
117115
androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "androidx-core-splashscreen" }
118116
androidx-core-testing = { module = "androidx.arch.core:core-testing", version.ref = "coreTesting" }
@@ -151,6 +149,8 @@ androidx-ui-tooling-preview = { module = "androidx.compose.ui:ui-tooling-preview
151149
androidx-window = { module = "androidx.window:window", version.ref = "androidx-window" }
152150
androidx-window-core = { module = "androidx.window:window-core", version.ref = "androidx-window" }
153151
coil-kt-compose = { module = "io.coil-kt:coil-compose", version.ref = "coil" }
152+
hilt-android = { group = "com.google.dagger", name = "hilt-android", version.ref = "hilt" }
153+
hilt-compiler = { group = "com.google.dagger", name = "hilt-compiler", version.ref = "hilt" }
154154
junit = { module = "junit:junit", version.ref = "junit" }
155155
junit-jupiter-engine = { module = "org.junit.jupiter:junit-jupiter-engine", version.ref = "junitJupiterEngine" }
156156
junit-jupiter-api = { module = "org.junit.jupiter:junit-jupiter-api", version.ref = "junitJupiterApi" }

0 commit comments

Comments
 (0)