Skip to main content

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?

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.