fix: [SDK-4877] preserve WorkDatabase constructor under R8#2685
Merged
Conversation
Co-authored-by: Cursor <cursoragent@cursor.com>
abdulraqeeb33
approved these changes
Jul 16, 2026
Contributor
📊 Diff Coverage Report✓ Coverage check passed (no source files changed) |
This was referenced Jul 16, 2026
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.
Description
One Line Summary
Preserve WorkManager’s generated database constructor so AGP 9 release builds do not crash during app startup.
Details
Motivation
Flutter 3.44 projects use AGP 9.0.1 and R8 full mode. With OneSignal’s WorkManager 2.8.1 dependency, R8 can remove the reflectively invoked
WorkDatabase_Implno-argument constructor. The resulting release APK builds successfully but crashes inandroidx.startup.InitializationProviderbefore application initialization.Scope
Adds one targeted consumer ProGuard rule to the notifications artifact. This preserves Android API 21 support and does not change public APIs or runtime behavior outside minified builds.
Linear: SDK-4877
Testing
Unit testing
No unit test was added because this behavior occurs in R8 output at application startup and cannot be exercised by the SDK unit-test process.
Manual testing
AndroidRuntimeerror../gradlew spotlessCheck :OneSignal:notifications:assembleRelease :app:assembleGmsRelease :app:assembleHuaweiRelease --console=plain.Affected code checklist
Checklist
Overview
Testing
Final pass