[android][breaking]Target jvm 11#79
Open
kiftio wants to merge 2 commits into
Open
Conversation
- @ConsistentCopyVisibility on Configuration so the generated copy() matches the primary constructor's internal visibility. Closes the leak where copy() could construct Configuration instances bypassing the internal constructor; Kotlin 2.5 will make this an error regardless. Public API change: Configuration.copy/copy$default are removed from the AAR (see lib/api/lib.api). - pushEntryToHistory(...) replaces deprecated ShadowWebView.setCanGoBack in CheckoutDialogTest. Populating history is the supported way to make canGoBack() return true.
markmur
approved these changes
May 13, 2026
tiagocandido
approved these changes
May 13, 2026
kieran-osgood-shopify
approved these changes
May 13, 2026
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
Raises the library's JVM target from 1.8 to 11. Unblocks Mockito 5.x in tests. Bundles two adjacent Kotlin-2.0 cleanups while we're cutting the major version: closing the
Configuration.copy()visibility leak, and migrating tests off deprecatedShadowWebView.setCanGoBack.Changes
lib/build.gradle:compileOptions.sourceCompatibility/targetCompatibility1.8 → 11; KotlinjvmTarget1.8 → 11.lib/build.gradle: Mockito core / kotlin / android 4.x → 5.x.// noinspection NewerVersionAvailablecomments dropped — the JVM-target constraint they explained is gone.lib/src/main/.../Configuration.kt:@ConsistentCopyVisibilityannotation. Generatedcopy()now matches the primary constructor'sinternalvisibility, closing the leak where consumers could bypassinternal constructorviacfg.copy(...). Kotlin 2.5 will make this an error anyway.lib/api/lib.api: 2-line removal —Configuration.copy(...)andcopy$default(...)no longer in the public AAR.lib/src/test/.../CheckoutDialogTest.kt:pushEntryToHistory(...)replaces deprecatedsetCanGoBack(true)in two back-press tests. Single inline comment explains the pattern.CLAUDE.md: JVM-target reference 1.8 → 11; Mockito 4.x pin note dropped.Why now
// noinspectioncomments inlib/build.gradleflagged this explicitly. With JVM 11 in place, Mockito 5.x is unblocked.Configuration.copy()deprecation is a Kotlin 2.0+ language warning that will be a hard error in Kotlin 2.5. The breaking-API cost is small (only consumers callingcfg.copy()to construct dangling objects, which has no useful end-point) and the cost grows the longer we delay.ShadowWebView.setCanGoBackis deprecated in Robolectric 4.16+ and slated for removal; the supported replacement is populating fake web history.Consumer impact
Configuration.copy(...)andcopy$default(...)removed (seelib.api). Affects only consumers explicitly calling.copy(...)on a Configuration. Since there is nosetConfiguration(...)setter on the library, those calls already produced dangling objects with no library-visible effect.Test plan
./gradlew :lib:clean :lib:test :lib:detekt :lib:lintRelease :lib:apiCheck :lib:assembleRelease— green./gradlew assembleDebugfromsamples/MobileBuyIntegration/— greenInteropTest(Java consumer test) — all cases passStack
Stacked on
compile-with-kotlin2.x. Merge after that one lands, or as a combined major-version cut.Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)Releasing a new Swift version?
platforms/swift/ShopifyCheckoutKit.podspecplatforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swiftplatforms/swift/CHANGELOG.mdplatforms/swift/README.md(major version only)Releasing a new Android version?
versionNameinplatforms/android/lib/build.gradleplatforms/android/CHANGELOG.mdplatforms/android/README.mdTip
See the Contributing documentation for the full release process per platform.