Summary
The project uses androidLifecycleGrouped = "2.7.0" for all lifecycle-related artifacts (lifecycle-viewmodel-compose, lifecycle-runtime-ktx, lifecycle-livedata-ktx, etc.). Lifecycle 2.8.x is now stable and includes important improvements.
Key Improvements in Lifecycle 2.8
LifecycleEventEffect and LifecycleStartEffect/LifecycleResumeEffect composables — cleaner replacements for DisposableEffect with LocalLifecycleOwner.
collectAsStateWithLifecycle improvements for safer Flow collection tied to UI lifecycle.
viewModel() KMP support — multiplatform ViewModel for future KMP migration.
- Bug fixes and improved SavedState integration.
Proposed Changes
- In
Versions.kt, update:
const val androidLifecycleGrouped = "2.8.x" // e.g. "2.8.7"
- All lifecycle artifacts using this version constant update automatically:
lifecycle-viewmodel-compose
lifecycle-viewmodel-ktx
lifecycle-livedata-ktx
lifecycle-runtime-ktx
lifecycle-viewmodel-savedstate
- Review usages of
DisposableEffect(lifecycleOwner) in the codebase and consider migrating to the new LifecycleEventEffect API where applicable.
- Run all tests to confirm no regressions.
References
Summary
The project uses
androidLifecycleGrouped = "2.7.0"for all lifecycle-related artifacts (lifecycle-viewmodel-compose,lifecycle-runtime-ktx,lifecycle-livedata-ktx, etc.). Lifecycle 2.8.x is now stable and includes important improvements.Key Improvements in Lifecycle 2.8
LifecycleEventEffectandLifecycleStartEffect/LifecycleResumeEffectcomposables — cleaner replacements forDisposableEffectwithLocalLifecycleOwner.collectAsStateWithLifecycleimprovements for safer Flow collection tied to UI lifecycle.viewModel()KMP support — multiplatform ViewModel for future KMP migration.Proposed Changes
Versions.kt, update:lifecycle-viewmodel-composelifecycle-viewmodel-ktxlifecycle-livedata-ktxlifecycle-runtime-ktxlifecycle-viewmodel-savedstateDisposableEffect(lifecycleOwner)in the codebase and consider migrating to the newLifecycleEventEffectAPI where applicable.References