Increase targetSdkVersion to 36#2446
Conversation
📸 Snapshot Test181 modified, 7 added, 7 removed, 394 unchanged
🛸 Powered by Emerge Tools |
This comment was marked as outdated.
This comment was marked as outdated.
d6c509c to
21b2790
Compare
| // This is needed because of an incompatibility between Robolectric and Paparazzi: | ||
| // https://github.com/cashapp/paparazzi/issues/1979 | ||
| forkEvery = 1 | ||
| maxParallelForks = 5 |
There was a problem hiding this comment.
Honestly I'm not in love with this and it does cause tests to be noticeable slower... but the alternative is to split the Paparazzi tests (right now we have 2 classes) into a separate module, and we're using internal APIs, so that isn't straightforward.
ajpallares
left a comment
There was a problem hiding this comment.
I think it makes sense, but some things escape my expertise... will leave approval to someone with more knowledge 🙏
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2446 +/- ##
=======================================
Coverage 79.47% 79.47%
=======================================
Files 357 357
Lines 14351 14351
Branches 1960 1960
=======================================
Hits 11406 11406
Misses 2141 2141
Partials 804 804 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
a87263b to
df6fa9d
Compare
| if (!view.isInEditMode) { | ||
| SideEffect { | ||
| val window = (view.context as Activity).window | ||
| window.statusBarColor = colorScheme.primary.toArgb() |
There was a problem hiding this comment.
This was using a deprecated API in Android 36. Since it's only used for previews, and it shouldn't really matter, I just removed it.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
| }, | ||
| backgroundColor = Color.Transparent, | ||
| elevation = 0.dp, | ||
| modifier = Modifier.background(Color.Transparent), |
There was a problem hiding this comment.
Transparent background not applied to Material3 TopAppBar
Low Severity
Modifier.background(Color.Transparent) does not replicate the old Material TopAppBar's backgroundColor = Color.Transparent behavior. Material3's TopAppBar renders its own container color (defaulting to the theme surface color) on top of the modifier background, so the bar won't actually be transparent. The colors parameter with TopAppBarDefaults.topAppBarColors(containerColor = Color.Transparent) is the correct way to achieve this in Material3.
| @@ -0,0 +1 @@ | |||
| sdk=34 | |||
There was a problem hiding this comment.
This is another workaround someone mentioned. Basically run robolectric tests in a lower target to avoid the conflicts with Paparazzi. Seems to work fine and probably better than the previous workaround (run each test class in a different JVM which made it super slow)
There was a problem hiding this comment.
@JayShortway in case you have any thoughts on the new approach for making this work. Planning to merge this next week as well.
There was a problem hiding this comment.
I think this is fine, indeed much better than creating a new JVM for each. Might be good to add a comment in the file explaining why we have that?
| ).performClick() | ||
|
|
||
| // Wait for error snackbar to appear and disappear so it doesn't overlay the button | ||
| composeTestRule.waitUntilDoesNotExist( |
There was a problem hiding this comment.
I had to add this to make the test pass. I believe with the library updates, the snackbar was interfering with the second touch. Until the snackbar went away, we couldn't tap again. I didn't want to modify the behavior of the feature, so I added this to the test. Lmk what you think 🙏
This reverts commit 9703693.
|
I gave it another shoot with another workaround for the issues we were seeing, and seems to be working. Seems the snapshots changes are mostly due to shadows, likely they were modified with the android runtime. Would appreciate another look! 🙇 @RevenueCat/coresdk @vegaro |
vegaro
left a comment
There was a problem hiding this comment.
Almost there! Thanks for persevering
There was a problem hiding this comment.
just noting that looks like the regular MagicWeather is still in compileSdk = 34
There was a problem hiding this comment.
Indeed... We do need to fix the UI a bit there to support edge to edge (which is mandatory when targeting 36). Maybe we can leave it for later? Good to bring it up though!
There was a problem hiding this comment.
sure no problem! just making sure you knew and you hadn't missed it there
| #-renamesourcefileattribute SourceFile | ||
| -keep class com.revenuecat.purchases.** { *; } | ||
| -dontwarn javax.lang.model.element.Modifier | ||
| -dontwarn com.google.errorprone.annotations.IncompatibleModifiers |
There was a problem hiding this comment.
I asume these are needed because of RoboElectric
There was a problem hiding this comment.
Indeed. I only run into issues with this for this integration tests module, which was weird for me... I didn't run into issues when running instrumentation tests in release mode in the purchases module, so I added these here. But without the robolectric bump, these are not needed, so I don't think it would affect customers
There was a problem hiding this comment.
Sorry I actually meant espresso. With the bump of espresso, this became necessary.
## RevenueCat SDK > [!WARNING] > If you don't have any login system in your app, please make sure your one-time purchase products have been correctly configured in the RevenueCat dashboard as either consumable or non-consumable. If they're incorr as consumables, RevenueCat will consume these purchases. This means that users won't be able to restore them from version 10.0.0 onward. > Non-consumables are products that are meant to be bought only once, for example, lifetime subscriptions. Please see more information in our [docs](https://www.revenuecat.com/docs/known-store-issues/play-billing-library/restore-consumable-purchases-bc8) ### 💥 Breaking Changes This release updates to Billing Library 8.3.0 with min SDK supported of Android 6 (API 23), previously min was 21. It also removes a previous workaround used to be able to restore consumed one time products which is not available anymore. * Update to Billing Library 8.3.0 (#3256) via Toni Rico (@tonidero) * Revert AIDL workaround for consumed consumables (#3255) via Toni Rico (@tonidero) ### 🔄 Other Changes * Bump fastlane-plugin-revenuecat_internal from `6289be1` to `ceecf91` (#3301) via dependabot[bot] (@dependabot[bot]) * Increase targetSdkVersion to 36 (#2446) via Toni Rico (@tonidero) * [AUTOMATIC] Update golden test files for backend integration tests (#3302) via RevenueCat Git Bot (@RCGitBot) * Bump fastlane-plugin-revenuecat_internal from `5d6e93f` to `6289be1` (#3299) via dependabot[bot] (@dependabot[bot]) * Bump fastlane-plugin-revenuecat_internal from `f11fe40` to `5d6e93f` (#3294) via dependabot[bot] (@dependabot[bot]) <!-- CURSOR_SUMMARY --> --- > [!NOTE] > **Medium Risk** > Primarily a release/version bump, but it ships documented breaking changes (minSdk 23 via Billing Library 8.3.0 and removal of a restore workaround) that can affect app compatibility and restore behavior. > > **Overview** > Bumps the project from `9.30.0-SNAPSHOT` to `10.0.0` across build metadata (`.version`, `gradle.properties`, `Config.frameworkVersion`) and sample/test app dependency pins. > > Updates release documentation: adds `10.0.0` entries to `CHANGELOG.md`/`CHANGELOG.latest.md` (including a warning and breaking-change notes) and introduces `migrations/v10-MIGRATION.md`. > > Adjusts docs publishing to serve `10.0.0` by updating `docs/index.html` redirect and the CircleCI S3 sync path in `docs-deploy`. > > <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit d18f479. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup> <!-- /CURSOR_SUMMARY -->


Description
This increases the target and compile Sdk versions of our SDKs and apps to android 16 (36). https://developer.android.com/about/versions/16/behavior-changes-16
Note
Medium Risk
Raising
compileSdk/targetSdkand updatingrobolectric/paparazzican surface behavior changes and test/runtime regressions; most code changes are build/test scaffolding rather than core SDK logic.Overview
Updates the project and example apps to compile/target Android SDK 36, centralizing SDK version numbers in
gradle/libs.versions.tomland removing the old top-levelbuildscriptextra version fields.Refreshes test/tooling dependencies (notably
robolectric,espresso,paparazzi, and AndroidX test libs) and applies required follow-ups: new Proguard-dontwarnrules for integration tests, addsrobolectric.propertiesto pin sdk for Paparazzi, and hardens a Compose UI test by waiting for the error snackbar to clear before retrying.Includes small Compose sample adjustments for newer Material3 APIs (e.g.,
TopAppBarusage) and removes status-bar side effects from example themes; backend integration test golden request headers are updated to reflect platform version36.Written by Cursor Bugbot for commit 4ac3db3. This will update automatically on new commits. Configure here.