Skip to content

add lifecycle-runtime-compose dependency#16

Open
YUVRAJ-SINGH-3178 wants to merge 1 commit into
hushnetlabs:mainfrom
YUVRAJ-SINGH-3178:main
Open

add lifecycle-runtime-compose dependency#16
YUVRAJ-SINGH-3178 wants to merge 1 commit into
hushnetlabs:mainfrom
YUVRAJ-SINGH-3178:main

Conversation

@YUVRAJ-SINGH-3178
Copy link
Copy Markdown

Adds lifecycle-runtime-compose to the version catalog and app dependencies.
Fixed Issue #6
@f4w4z

Copilot AI review requested due to automatic review settings May 5, 2026 19:33
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to address issue #6 by wiring androidx.lifecycle:lifecycle-runtime-compose into the Android app’s dependency setup so Compose screens can adopt lifecycle-aware state collection.

Changes:

  • Added androidx.lifecycle:lifecycle-runtime-compose to the Gradle version catalog.
  • Added the new lifecycle Compose artifact to the app module dependencies.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
gradle/libs.versions.toml Adds a version-catalog entry for lifecycle-runtime-compose.
app/build.gradle.kts Adds the new catalog dependency to the app module’s implementation configuration.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread app/build.gradle.kts
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.lifecycle.runtime.ktx)
implementation(libs.androidx.lifecycle.runtime.compose)
Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

there's no collectAsState() to migrate, but the actual reason the dependency is needed is that MainActivity.kt and QrScannerScreen.kt already import LocalLifecycleOwner from lifecycle-runtime-compose without it being explicitly declared, it's just resolving transitively right now. This makes it explicit. There's nothing to migrate to collectAsStateWithLifecycle() yet since the codebase doesn't use StateFlow or collectAsState(), but the dependency is a prerequisite for when that's added.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants