Skip to content

Conversation

tonidero
Copy link
Contributor

@tonidero tonidero commented Aug 1, 2025

Description

While CEC already had the storefrontCountryCode, this also adds the APIs getStorefrontCountryCode and awaitStorefrontCountryCode to the CEC flavor.

@tonidero tonidero added pr:other pr:force_patch Forces a patch release labels Aug 1, 2025
@tonidero tonidero force-pushed the expose-get-storefront-apis-cec-mode branch from a7a9da9 to 142265f Compare August 1, 2025 06:57
method @Deprecated public static void getSubscriptionSkusWith(com.revenuecat.purchases.Purchases, java.util.List<java.lang.String> skus, optional kotlin.jvm.functions.Function1<? super com.revenuecat.purchases.PurchasesError,kotlin.Unit> onError, kotlin.jvm.functions.Function1<? super java.util.List<? extends com.revenuecat.purchases.models.StoreProduct>,kotlin.Unit> onReceiveSkus);
method public static void getVirtualCurrenciesWith(com.revenuecat.purchases.Purchases, optional kotlin.jvm.functions.Function1<? super com.revenuecat.purchases.PurchasesError,kotlin.Unit> onError, kotlin.jvm.functions.Function1<? super com.revenuecat.purchases.virtualcurrencies.VirtualCurrencies,kotlin.Unit> onSuccess);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused why these are not updated nor found in the checks...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea it seems like we cannot rely on the check at all. I think we might need to go the git diff route?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yup indeed

Copy link

codecov bot commented Aug 1, 2025

Codecov Report

❌ Patch coverage is 44.44444% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.64%. Comparing base (51baa24) to head (3d46cea).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...revenuecat/purchases/CoroutinesExtensionsCommon.kt 0.00% 5 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2579   +/-   ##
=======================================
  Coverage   78.64%   78.64%           
=======================================
  Files         296      296           
  Lines       10888    10888           
  Branches     1520     1520           
=======================================
  Hits         8563     8563           
  Misses       1663     1663           
  Partials      662      662           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tonidero tonidero marked this pull request as ready for review August 1, 2025 07:37
@tonidero tonidero requested a review from a team August 1, 2025 07:37
Copy link
Member

@JayShortway JayShortway left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

method @Deprecated public static void getSubscriptionSkusWith(com.revenuecat.purchases.Purchases, java.util.List<java.lang.String> skus, optional kotlin.jvm.functions.Function1<? super com.revenuecat.purchases.PurchasesError,kotlin.Unit> onError, kotlin.jvm.functions.Function1<? super java.util.List<? extends com.revenuecat.purchases.models.StoreProduct>,kotlin.Unit> onReceiveSkus);
method public static void getVirtualCurrenciesWith(com.revenuecat.purchases.Purchases, optional kotlin.jvm.functions.Function1<? super com.revenuecat.purchases.PurchasesError,kotlin.Unit> onError, kotlin.jvm.functions.Function1<? super com.revenuecat.purchases.virtualcurrencies.VirtualCurrencies,kotlin.Unit> onSuccess);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yea it seems like we cannot rely on the check at all. I think we might need to go the git diff route?

@tonidero tonidero added this pull request to the merge queue Aug 1, 2025
Copy link
Member

@ajpallares ajpallares left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense! Thank you!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious: what are these txt files for?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They have the public API for our libraries, both in the defaults flavor and the cec flavor. We're using metalava to generate them. Unfortunately, the check task itself doesn't seem to be working, so we might need to fallback to always dump these api files and compare using git.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These are "dumps" of our public API surface. We have them in other repos too, like purchases-kmp. The idea being that any PR would check if the committed text file is still valid. If not, the PR author should regenerate the file, which would add the diff to the PR, allowing us to review it.

In purchases-android we use Metalava for this (a Google tool), but the "check" task doesn't seem to work consistently. It overlooks changes to the public API, which becomes evident once we regenerate the files and see unrelated changes. (Virtual Currency stuff in this PR for instance.)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Ha, I should have refreshed before hitting send 😅)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I understand now. Thank you both so much! 🫶
(two explanations is better than one 😄)

Merged via the queue into main with commit f9edf9e Aug 1, 2025
20 checks passed
@tonidero tonidero deleted the expose-get-storefront-apis-cec-mode branch August 1, 2025 08:08
tonidero added a commit that referenced this pull request Aug 1, 2025
While CEC already had the `storefrontCountryCode`, this also adds the
APIs `getStorefrontCountryCode` and `awaitStorefrontCountryCode` to the
CEC flavor.
@tonidero tonidero mentioned this pull request Aug 1, 2025
tonidero pushed a commit that referenced this pull request Aug 1, 2025
**This is an automatic release.**

## RevenueCat SDK
### 🐞 Bugfixes
* Add lifetime badge to customer center (#2565) via Cesar de la Vega
(@vegaro)
### Customer Center
#### ✨ New Features
* Introduce custom actions for customer center (#2572) via Facundo
Menzella (@facumenzella)

## RevenueCatUI SDK
### ✨ New Features
* Add support for az-AZ locale (#2575) via Franco Correa
(@francocorreasosa)
### Customer Center
#### 🐞 Bugfixes
* Display latest expired subscription if no active subscriptions (#2564)
via Cesar de la Vega (@vegaro)

### 🔄 Other Changes
* Expose getStorefront APIs in CustomEntitlementComputation flavor
(#2579) via Toni Rico (@tonidero)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2578) via RevenueCat Git Bot (@RCGitBot)
* Add missing dokka-hide-internal tests to CI and fix reported number of
tests (#2569) via Cesar de la Vega (@vegaro)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2574) via RevenueCat Git Bot (@RCGitBot)
* Convert WebBilling products into TestStoreProducts (#2573) via Toni
Rico (@tonidero)
* Add WebBillingGetProducts endpoint (#2571) via Toni Rico (@tonidero)
* Remove TestStoreProduct purchase check (#2570) via Toni Rico
(@tonidero)
* Improve 9.0.0 changelog (#2568) via Toni Rico (@tonidero)
* [AUTOMATIC][Paywalls V2] Updates paywall-preview-resources submodule
(#2567) via RevenueCat Git Bot (@RCGitBot)
* Parallel test jobs (#2549) via Cesar de la Vega (@vegaro)

Co-authored-by: revenuecat-ops <ops@revenuecat.com>
tonidero added a commit that referenced this pull request Aug 25, 2025
While CEC already had the `storefrontCountryCode`, this also adds the
APIs `getStorefrontCountryCode` and `awaitStorefrontCountryCode` to the
CEC flavor.
@tonidero tonidero mentioned this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr:force_patch Forces a patch release pr:other
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants