Repository navigation
fix(android): suppress R8 warnings for optional push provisioning classes - #2715
Merged
cttsai-stripe merged 1 commit intoOct 7, 2026
Merged
Conversation
…sses Co-authored-by: Cursor <cursoragent@cursor.com>
1 of 4 tasks
1 of 2 tasks
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.
Summary
Add
-dontwarn com.stripe.android.pushProvisioning.**to the library's consumer ProGuard rules (android/proguard-rules.txt), next to the existing-dontwarnfor TapAndPay.Motivation
Fixes #1700.
com.stripe:stripe-android-issuing-push-provisioningis acompileOnlydependency. Asandroid/build.gradlenotes, apps add it themselves only when they use push provisioning. The SDK'spushprovisioningpackage still references its classes, so any app that enables R8 without that dependency fails:app:minifyReleaseWithR8:The code is already built for these classes to be missing:
PushProvisioningProxychecks for them withClass.forNamebefore use and logs instead of crashing. R8 doesn't know that, so each app currently has to add this rule itself, as the workarounds in #1700 show. This matters more now that the Expo SDK 58 template enables R8 for release builds by default.Apps that do include push provisioning are unaffected: their classes are present, and the existing
-keepclassmembersrule forcom.stripe.android.pushProvisioning.**still applies.Testing
In our Expo SDK 58 app (React Native 0.88, AGP 9.2.1, Gradle 9.4.1,
@stripe/stripe-react-native0.63.0, push provisioning dependency not installed)::app:minifyReleaseWithR8fails with the missing-class errors above;proguard-rules.txtand no app-level rule,:app:minifyReleaseWithR8passes, and the R8 mapping contains nocom.stripe.android.pushProvisioningclasses.Documentation
Select one: