fix(android-sdk): add -dontwarn consumer rules for optional social SDKs - #259
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR updates the Android SDK’s consumer ProGuard/R8 rules to prevent R8 full-mode release builds from failing when consuming apps do not bundle the optional Alipay/WeChat SDK dependencies (which are compileOnly in the SDK).
Changes:
- Add consumer
-dontwarnrules forcom.alipay.sdk.**andcom.tencent.mm.opensdk.**. - Document why these rules are required for consumers building with R8 full mode.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
charIeszhao
approved these changes
Jun 11, 2026
Merged
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
Fixes #255.
The v2 SDK ships built-in Alipay/WeChat social sessions whose SDKs are
compileOnlydependencies. Apps that don't bundle those SDKs fail release builds under R8 full mode (the default since AGP 8) with hard missing-class errors:This adds
-dontwarn com.alipay.sdk.**and-dontwarn com.tencent.mm.opensdk.**to the consumer ProGuard rules shipped with the AAR (via the existingconsumerProguardFile), so consuming apps no longer need to maintain the-dontwarnworkaround themselves. The two patterns cover everything the SDK references from the optional dependencies (com.alipay.sdk.app.OpenAuthTaskand thecom.tencent.mm.opensdk.{constants,modelbase,modelmsg,openapi}classes).v3 (
master) is unaffected — the built-in social connectors were removed there in #249.Testing
N/A — consumer ProGuard rules only; the referenced class patterns were verified against the SDK's imports.
Checklist
.changeset(N/A — this repo uses release-please)🤖 Generated with Claude Code