Add BuildConfig to RevenueCat to gate workflow prewarming#3505
Merged
Conversation
vegaro
approved these changes
May 26, 2026
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #3505 +/- ##
==========================================
+ Coverage 79.89% 79.92% +0.03%
==========================================
Files 369 369
Lines 14875 14880 +5
Branches 2048 2049 +1
==========================================
+ Hits 11884 11893 +9
+ Misses 2158 2154 -4
Partials 833 833 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
matteinn
pushed a commit
to matteinn/purchases-android
that referenced
this pull request
Jun 5, 2026
**This is an automatic release.** ## RevenueCat SDK ### 🐞 Bugfixes * Add BuildConfig to RevenueCat to gate workflow prewarming (RevenueCat#3505) via Facundo Menzella (@facumenzella) ### Galaxy Store #### ✨ New Features * [Galaxy Store]: Upgrade Samsung IAP SDK to version 6.5.2 + use Maven distribution (RevenueCat#3492) via Will Taylor (@fire-at-will) ## RevenueCatUI SDK ### 🐞 Bugfixes * Remove `workflow_trigger` interaction event (RevenueCat#3467) via Cesar de la Vega (@vegaro) ### 🔄 Other Changes * build(deps): bump fastlane from 2.234.0 to 2.235.0 (RevenueCat#3506) via dependabot[bot] (@dependabot[bot]) * [Galaxy Store]: Remove @experimental annotations from Galaxy Module (RevenueCat#3494) via Will Taylor (@fire-at-will) * Update baseline profiles (RevenueCat#3504) via RevenueCat Git Bot (@RCGitBot) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Version and documentation/deploy path updates only; shipped behavior is documented in the changelog from prior merged PRs. > > **Overview** > **Automatic release** that finalizes **10.7.0** by dropping the `-SNAPSHOT` suffix everywhere the SDK version is declared or published. > > Version strings are updated in `gradle.properties`, `.version`, `Config.frameworkVersion`, and sample/test `libs.versions.toml` files. Docs publishing now syncs **`10.7.0`** to S3 and the docs redirect points at `https://sdk.revenuecat.com/android/10.7.0/`. **CHANGELOG.md** gains the **10.7.0** section (content matches the release notes already listed for this train: workflow prewarming gated via BuildConfig, Galaxy Store Samsung IAP 6.5.2, RevenueCatUI workflow_trigger removal, etc.). > > No new product logic appears in the diff beyond the version constant bump. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 66071a0. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
vegaro
pushed a commit
that referenced
this pull request
Jun 24, 2026
## Summary A customer reported about 404's on `GET /v1/subscribers/<app_user_id>/workflows/<workflow_id>` - Add `BuildConfig.USE_WORKFLOWS_ENDPOINT` to the `:purchases` module, using the existing `revenuecat.useWorkflowsEndpoint` property that was already used by RevenueCatUI. - Gate automatic workflow pre-warming in `PurchasesFactory` behind that core module flag. ## Root Cause `PurchasesFactory` always supplied a `workflowPreWarmer`, so every offerings fetch with a current offering called `getWorkflow` for that offering identifier. That created automatic workflow requests for apps that did not opt in to the workflows endpoint. <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Low Risk** > Opt-in behavior via an existing build flag (defaults off); only reduces unsolicited network calls unless workflows are explicitly enabled. > > **Overview** > Stops the core `:purchases` SDK from **always** pre-fetching workflows when offerings load, which was causing unwanted `GET /v1/subscribers/.../workflows/...` traffic and **404s** for apps that never enabled workflows. > > The module now exposes **`BuildConfig.USE_WORKFLOWS_ENDPOINT`**, driven by the existing **`revenuecat.useWorkflowsEndpoint`** Gradle/local property (same knob RevenueCat UI already used). **`PurchasesFactory.createWorkflowPreWarmer`** only supplies a pre-warmer when that flag is true; otherwise **`OfferingsManager`** gets `null` and skips background **`getWorkflow`** calls. Unit tests cover both enabled and disabled paths. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit bc9242e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->
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
A customer reported about 404's on
GET /v1/subscribers/<app_user_id>/workflows/<workflow_id>BuildConfig.USE_WORKFLOWS_ENDPOINTto the:purchasesmodule, using the existingrevenuecat.useWorkflowsEndpointproperty that was already used by RevenueCatUI.PurchasesFactorybehind that core module flag.Root Cause
PurchasesFactoryalways supplied aworkflowPreWarmer, so every offerings fetch with a current offering calledgetWorkflowfor that offering identifier. That created automatic workflow requests for apps that did not opt in to the workflows endpoint.Note
Low Risk
Opt-in behavior via an existing build flag (defaults off); only reduces unsolicited network calls unless workflows are explicitly enabled.
Overview
Stops the core
:purchasesSDK from always pre-fetching workflows when offerings load, which was causing unwantedGET /v1/subscribers/.../workflows/...traffic and 404s for apps that never enabled workflows.The module now exposes
BuildConfig.USE_WORKFLOWS_ENDPOINT, driven by the existingrevenuecat.useWorkflowsEndpointGradle/local property (same knob RevenueCat UI already used).PurchasesFactory.createWorkflowPreWarmeronly supplies a pre-warmer when that flag is true; otherwiseOfferingsManagergetsnulland skips backgroundgetWorkflowcalls. Unit tests cover both enabled and disabled paths.Reviewed by Cursor Bugbot for commit bc9242e. Bugbot is set up for automated code reviews on this repo. Configure here.