RevenueCat’s Android Codegen plugin turns dashboard strings into compile-time safe entitlements and offerings
RevenueCat ships a Codegen Gradle plugin that fetches your project schema at build time and generates Kotlin accessors for entitlements, offerings, and packages. Fewer runtime nulls, more autocomplete, and less drift between dashboard config and app code.
Original article (source): RevenueCat - “Introducing the RevenueCat Codegen Gradle Plugin: type safe entitlements and offerings on Android” (Jun 11, 2026)
Summary
RevenueCat’s argument is simple: string keys are a quiet source of revenue bugs.
Most integrations end up doing things like:
entitlements["premium_access"]getOffering("perplexity")
That compiles even when the key is wrong, so failures show up later as runtime nulls (or purchase flow breakage).
The Codegen Gradle plugin solves this by:
- Fetching your RevenueCat project schema at build time (entitlements, offerings, packages).
- Generating Kotlin code (IDs + extension properties) so your app code becomes autocomplete-friendly and typo-resistant.
What you get in practice:
- Generated ID constants (useful for analytics/logging without hand-maintained constants files).
- Convenience extensions like
CustomerInfo.isPremiumAccessActive. - Offering and package accessors that avoid collisions by namespacing packages per offering.
- Caching and offline modes so local builds do not depend on the network, while CI can be configured to fail hard if schema fetch fails.
Why this matters
Anything that breaks purchases tends to be:
- hard to catch in QA,
- expensive when it ships,
- and annoying to debug (“it worked yesterday”).
If you rely on remote-config style dashboard changes, codegen also forces a healthy discipline: dashboard changes that affect app logic still require an app release (unless you deliberately keep dynamic paths).
Tiny win
Even if you do not adopt this plugin, steal the principle:
- put all entitlement and offering IDs behind a single typed surface (generated or manually curated),
- and add one unit test that asserts the IDs you depend on are present in the payload you expect.
Read the original: https://www.revenuecat.com/blog/engineering/android-codegen/
Want help with ASO?
If you want this implemented for your app, check out our services - or run your workflow in APPlyzer.