fix(android): suppress R8 missing-class errors for Play Core split-install; run minification in CI - #256
Merged
Conversation
…stall Agent-Logs-Url: https://github.com/richardthe3rd/cambridge-beer-festival-app/sessions/27a01538-86c3-4ea1-a9b8-33f67616d931 Co-authored-by: richardthe3rd <573334+richardthe3rd@users.noreply.github.com>
Copilot created this pull request from a session on behalf of
richardthe3rd
May 11, 2026 18:06
View session
richardthe3rd
marked this pull request as ready for review
May 11, 2026 18:06
Contributor
There was a problem hiding this comment.
Pull request overview
This PR addresses Android release build failures caused by R8 treating Flutter’s deferred-component (Play Core split-install) references as missing-class errors, and updates CI to run minification on every PR by building the Android APK in --release mode.
Changes:
- Suppress R8 missing-class warnings/errors for Play Core split-install packages via
-dontwarnrules. - Switch the CI Android build from
flutter build apk --debugto--releaseand update the uploaded artifact name/path accordingly.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| android/app/proguard-rules.pro | Adds -dontwarn rules for Play Core split-install packages to prevent R8 missing-class failures in release builds. |
| .github/workflows/ci.yml | Builds a release APK in CI (debug-signed) to ensure R8/minification runs on PRs; updates artifact name and output path. |
| name: app-release-apk | ||
| path: build/app/outputs/flutter-apk/app-release.apk | ||
| if-no-files-found: error | ||
|
|
|
|
||
| # Flutter references Play Core split-install classes for deferred component support. | ||
| # This app does not use dynamic feature modules, so these classes are absent at | ||
| # compile time. Suppress the missing-class errors R8 raises for them. |
Contributor
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
🚀 Cloudflare Pages PreviewYour preview deployment is ready! Preview URL: https://copilot-fix-proguard-r8-conf.staging-cambeerfestival.pages.dev This preview will be automatically updated when you push new commits to this PR. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flutter's embedding unconditionally references
com.google.android.play.coresplit-install classes (PlayStoreDeferredComponentManager,FlutterPlayStoreSplitApplication, etc.) regardless of whether the app uses deferred components. R8 treats any unresolvable referenced class as a hard error, breaking the release build.The CI
build-androidjob was using--debug, which skips R8 entirely — so this only surfaced at release time.Changes
android/app/proguard-rules.pro— add-dontwarnfor the three missing Play Core packages:Safe to suppress: the referencing code paths are dead for apps without dynamic feature modules.
.github/workflows/ci.yml— switchbuild-androidfromflutter build apk --debugto--release.key.propertiesis absent in this job, sobuild.gradlefalls back to debug signing automatically — but R8 now runs on every PR, catching minification failures before release.