From 61100d0c83c7446f7910d0e97cb3ed10f48c3e20 Mon Sep 17 00:00:00 2001 From: GG Bond Date: Sun, 26 Nov 2023 23:59:10 +0800 Subject: [PATCH] Upgrade lifecycle for new compose utils --- app/build.gradle.kts | 1 + gradle/libs.versions.toml | 5 +++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/app/build.gradle.kts b/app/build.gradle.kts index a7a0d3cb5..5695a38cc 100644 --- a/app/build.gradle.kts +++ b/app/build.gradle.kts @@ -218,6 +218,7 @@ dependencies { // https://developer.android.com/jetpack/androidx/releases/lifecycle implementation(libs.androidx.lifecycle.process) implementation(libs.androidx.lifecycle.compose) + implementation(libs.androidx.lifecycle.viewmodel.compose) // https://developer.android.com/jetpack/androidx/releases/navigation implementation(libs.bundles.androidx.navigation) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index cee754929..bbdbe3d86 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -11,7 +11,7 @@ androidx-coordinatorlayout = "1.2.0" androidx-core = "1.12.0" androidx-core-splashscreen = "1.1.0-alpha02" androidx-fragment = "1.7.0-alpha06" -androidx-lifecycle = "2.6.2" +androidx-lifecycle = "2.7.0-rc01" androidx-navigation = "2.7.5" androidx-paging = "3.2.1" androidx-recyclerview = "1.3.2" @@ -53,7 +53,8 @@ androidx-core = { module = "androidx.core:core-ktx", version.ref = "androidx-cor androidx-core-splashscreen = { module = "androidx.core:core-splashscreen", version.ref = "androidx-core-splashscreen" } androidx-fragment = { module = "androidx.fragment:fragment-ktx", version.ref = "androidx-fragment" } androidx-lifecycle-process = { module = "androidx.lifecycle:lifecycle-process", version.ref = "androidx-lifecycle" } -androidx-lifecycle-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" } +androidx-lifecycle-compose = { module = "androidx.lifecycle:lifecycle-runtime-compose", version.ref = "androidx-lifecycle" } +androidx-lifecycle-viewmodel-compose = { module = "androidx.lifecycle:lifecycle-viewmodel-compose", version.ref = "androidx-lifecycle" } androidx-navigation-compose = { module = "androidx.navigation:navigation-compose", version.ref = "androidx-navigation" } androidx-navigation-ui = { module = "androidx.navigation:navigation-ui-ktx", version.ref = "androidx-navigation" }