Skip to main content
Question

Comply with R8 app optimization

  • August 29, 2026
  • 1 reply
  • 16 views

Forum|alt.badge.img

Hi,

Google Play has recently published the new guidelines for app optimization with R8 and is actively pushing for it (https://developer.android.com/topic/performance/app-optimization/enable-app-optimization).

I want to comply ASAP, but I am also super paranoid about breaking anything related to the payments.

I just updated to:
```
"@revenuecat/purchases-capacitor": "13.4.2",
"@revenuecat/purchases-capacitor-ui": "13.4.2",

```
 

And I found that the dependency comes with the proguard rule:
`-keep class com.revenuecat.** { *; }`

I am happy with all that, all I want is to make sure that once I enable this:

```
minifyEnabled = true
shrinkResources = true
```

nothing breaks.
So I would appreciate the “official” confirmation on this.
Thank you!

1 reply

guilherme
RevenueCat Staff
Forum|alt.badge.img+6
  • RevenueCat Staff
  • August 31, 2026

Thanks for reaching out and for digging into the ProGuard rules on your side! 

So, yes, you can enable minifyEnabled and shrinkResources with @revenuecat/purchases-capacitor / purchases-capacitor-ui 13.4.2. Our Android SDK ships consumer ProGuard/R8 rules on purpose, so you should not need to add anything extra for RevenueCat itself. The -keep class com.revenuecat.** { *; } rule you found is the one we ship, and it covers the Capacitor plugin packages under com.revenuecat as well.

We are also aware of Google's latest news on R8 / app optimization, and our SDK team is actively working on refining those consumer ProGuard rules further so apps can optimize more over time. That work does not block you from turning minify on with the current SDK though, so you are okay to go ahead as of now.

A recommendation here would be to smoke-test a release build after flipping those flags (offerings, a purchase, restore, and a Paywall if you use purchases-capacitor-ui), since other dependencies in the app can need their own keep rules even when ours are already in place.

And of course, if something looks odd when you do, please let us know!