Skip to content

fix: Pin android dependency versions to prevent pre-release pickup#418

Merged
ABausG merged 1 commit into
ABausG:mainfrom
shenlong-tanwen:fix/pin-android-deps
May 23, 2026
Merged

fix: Pin android dependency versions to prevent pre-release pickup#418
ABausG merged 1 commit into
ABausG:mainfrom
shenlong-tanwen:fix/pin-android-deps

Conversation

@shenlong-tanwen
Copy link
Copy Markdown
Contributor

Description

Replaces three dynamic version selectors with concrete latest-stable versions in build.gradle

Checklist

  • I have updated/added tests for ALL new/updated/fixed functionality.
  • I have updated/added relevant documentation and added code (documentation) comments where necessary.
  • I have updated/added relevant examples in example or documentation.

Breaking Change?

  • Yes, this PR is a breaking change.
  • No, this PR is not a breaking change.

Related Issues

Closes #417

@docs-page
Copy link
Copy Markdown

docs-page Bot commented May 19, 2026

To view this pull requests documentation preview, visit the following URL:

docs.page/abausg/home_widget~418

Documentation is deployed and generated using docs.page.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 19, 2026

Review Change Stack

Walkthrough

Three Android library dependencies in the home_widget build configuration are pinned from dynamic version ranges (1.+, 2.+) to concrete stable versions, preventing pre-release versions from silently breaking downstream Flutter app builds via Gradle dependency resolution.

Changes

Android dependency version pinning

Layer / File(s) Summary
Pin Android dependencies to stable versions
packages/home_widget/android/build.gradle
androidx.glance:glance-appwidget, androidx.work:work-runtime-ktx, and org.jetbrains.kotlinx:kotlinx-coroutines-android are updated from dynamic + version selectors to specific pinned versions, preventing pre-release versions from being selected by Gradle's dependency resolver.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed The description provides a clear summary of changes, confirms non-breaking status, and references the related issue, though it could be more detailed about the specific dependency changes.
Linked Issues check ✅ Passed The PR directly addresses issue #417 by pinning three Android dependencies (androidx.glance:glance-appwidget, androidx.work:work-runtime-ktx, kotlinx-coroutines-android) to concrete stable versions, preventing pre-release resolution.
Out of Scope Changes check ✅ Passed All changes are strictly within scope: only the three problematic dependency version selectors in build.gradle were modified; no unrelated changes were introduced.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed The title 'Pin android dependency versions to prevent pre-release pickup' accurately reflects the main change: pinning three Android dependencies to fixed versions instead of dynamic ranges to prevent pre-release artifacts from being resolved.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@shenlong-tanwen shenlong-tanwen changed the title build: pin android dependency versions to prevent pre-release pickup build: Pin android dependency versions to prevent pre-release pickup May 19, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/home_widget/android/build.gradle`:
- Around line 54-56: Update the Android Gradle dependencies to compatible
artifacts: replace the dependency implementation
"androidx.work:work-runtime-ktx:2.11.2" with implementation
"androidx.work:work-runtime:2.11.2" (use the work-runtime artifact instead of
the empty work-runtime-ktx), and change implementation
"org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2" to a
kotlinx-coroutines-android version compatible with Kotlin 1.9.0 (downgrade to a
1.6.x/1.7.x release that supports Kotlin 1.9.0) or alternatively upgrade the
project Kotlin version to 2.1.0+ if you prefer to keep
kotlinx-coroutines-android 1.10.2; locate these strings in the build.gradle
dependency block (the lines with androidx.work:work-runtime-ktx and
org.jetbrains.kotlinx:kotlinx-coroutines-android) and update them accordingly.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: b9fcfebb-23e0-4e91-b674-fa1378175084

📥 Commits

Reviewing files that changed from the base of the PR and between 55e6f43 and 4d0c5aa.

📒 Files selected for processing (1)
  • packages/home_widget/android/build.gradle

Comment thread packages/home_widget/android/build.gradle
@VinsonGuo
Copy link
Copy Markdown

Thank you, this PR solved the compile issue in my project. Hope it could be merged to main asap 👍

@codecov
Copy link
Copy Markdown

codecov Bot commented May 22, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (55e6f43) to head (4d0c5aa).

Additional details and impacted files
@@            Coverage Diff            @@
##              main      #418   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines          175       175           
=========================================
  Hits           175       175           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ABausG ABausG changed the title build: Pin android dependency versions to prevent pre-release pickup fix: Pin android dependency versions to prevent pre-release pickup May 23, 2026
@ABausG ABausG merged commit e42f1f7 into ABausG:main May 23, 2026
14 of 15 checks passed
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.

Dynamic version selectors in android/build.gradle cause builds to silently break when transitive dependencies ship pre-releases

3 participants