fix: Support Android Gradle Plugin 9.x#420
Conversation
|
To view this pull requests documentation preview, visit the following URL: docs.page/abausg/home_widget~420 Documentation is deployed and generated using docs.page. |
WalkthroughDetects Android Gradle Plugin >= 9 via ChangesAndroid Gradle Plugin Version Compatibility
🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #420 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 3 3
Lines 175 175
=========================================
Hits 175 175 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
packages/home_widget/android/build.gradle (1)
60-62: 💤 Low valueConsider separating dependency updates from the AGP 9 compatibility fix.
These dependency updates (
glance-appwidget,work-runtime-ktx,kotlinx-coroutines-android) are not mentioned in the PR description or title. If they're required for AGP 9 compatibility, please document that relationship. Otherwise, consider moving them to a separate PR for clearer change tracking and easier rollback if needed.🤖 Prompt for 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. In `@packages/home_widget/android/build.gradle` around lines 60 - 62, The PR currently mixes AGP 9 compatibility changes with dependency bumps for androidx.glance:glance-appwidget:1.1.1, androidx.work:work-runtime-ktx:2.11.2, and org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2; either move these three dependency upgrades into a separate PR (restore previous versions here) or add a short note in the PR description explaining why each bump is required for AGP 9 compatibility and which tests/changes justify them so reviewers can track and revert individually if needed.
🤖 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.
Nitpick comments:
In `@packages/home_widget/android/build.gradle`:
- Around line 60-62: The PR currently mixes AGP 9 compatibility changes with
dependency bumps for androidx.glance:glance-appwidget:1.1.1,
androidx.work:work-runtime-ktx:2.11.2, and
org.jetbrains.kotlinx:kotlinx-coroutines-android:1.10.2; either move these three
dependency upgrades into a separate PR (restore previous versions here) or add a
short note in the PR description explaining why each bump is required for AGP 9
compatibility and which tests/changes justify them so reviewers can track and
revert individually if needed.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 1e08c07c-4074-466a-91ae-2bb31d638b3f
📒 Files selected for processing (1)
packages/home_widget/android/build.gradle
Description
Starting with Android Gradle Plugin 9.0, Kotlin support is embedded in
AGP itself and applying the standalone
kotlin-androidplugin causes abuild failure.
This PR detects the AGP version and skips both the plugin application
and the
kotlinOptionsblock when running on AGP 9 or above, keepingthe existing behavior unchanged for AGP 8.x and below.
Same approach used by file_picker
since version 10.x.
Checklist
exampleor documentation.Breaking Change?