Skip to main content
Question

Relax Proguard rules?

  • June 3, 2025
  • 1 reply
  • 11 views

Forum|alt.badge.img

Looking over the consumer proguard rules for the purchases library on Android, I noticed the first line is `-keep class com.revenuecat.** { *; }` which ends up causing most of the SDK to be kept when using R8. This totals over 9100 methods (as of the latest version). Is there a reason that the entire SDK is kept? Can you relax the rules so that some of the unused code can be stripped?

This post has been closed for comments

1 reply

chris_perriam
RevenueCat Staff
Forum|alt.badge.img+4

Hi ​@michael-evans we agree this is a worthwhile optimization. Today the SDK uses reflection in several spots, so the ProGuard rules stay intentionally broad to avoid runtime issues for developers. We’re working towards changes in the SDK which would allow us to ship a narrower rule set, but we don’t have a timeline for when this will be available.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings