[Kotlin] Move Client to protocol#438
Merged
Merged
Conversation
Contributor
Author
Package Size
Android file breakdown
Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report. |
kiftio
approved these changes
Jul 13, 2026
markmur
force-pushed
the
decode-error-logging-parity
branch
from
July 13, 2026 16:09
48cc8eb to
6e6776f
Compare
markmur
force-pushed
the
kotlin-decode-error-parity
branch
from
July 13, 2026 16:09
4ca1cfe to
486f8ce
Compare
markmur
force-pushed
the
decode-error-logging-parity
branch
from
July 13, 2026 17:08
6e6776f to
296e415
Compare
markmur
force-pushed
the
kotlin-decode-error-parity
branch
from
July 13, 2026 17:08
486f8ce to
4775200
Compare
This was referenced Jul 13, 2026
tiagocandido
approved these changes
Jul 14, 2026
markmur
force-pushed
the
kotlin-decode-error-parity
branch
from
July 14, 2026 08:22
4775200 to
3b8b1e8
Compare
markmur
force-pushed
the
decode-error-logging-parity
branch
from
July 14, 2026 08:22
296e415 to
0070c87
Compare
markmur
force-pushed
the
kotlin-decode-error-parity
branch
2 times, most recently
from
July 14, 2026 08:59
acda492 to
d0e4451
Compare
markmur
force-pushed
the
kotlin-decode-error-parity
branch
from
July 14, 2026 10:03
d0e4451 to
1e6dca2
Compare
Contributor
Author
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.

What changes are you making?
Kotlin was the odd platform out: TS (
client.ts) and Swift (EmbeddedCheckoutProtocol+Client.swift) ship a generic dispatchClient— withonDecodeError— inside their protocol packages, but Kotlin had noClientin theembedded-checkout-protocolartifact. The dispatch loop lived entirely in the kit'sCheckoutProtocol.Client, which decoded, routed, and encoded inline. This PR closes that structural gap and exposesonDecodeErrorpublicly, matching the parity #437 established for TS + Swift.Stacked on #437.
Protocol (
embedded-checkout-protocol)Client:on(NotificationDescriptor),on(RequestDescriptor), chainableonDecodeError, andprocess(message). It is thread-agnostic and synchronous — handlers run on the calling thread, so hosts wrap them for threading before registering.onDecodeErrorispublic(Kotlin lands at TS's public level; it has nopackagevisibility andinternalin the artifact is invisible to the kit). ASerializationExceptionwhile decoding a notification skips dispatch and fires the callback; a request with undecodable params fires the callback and answers with an invalid-params error; envelope-level failures stay silent (matching the.unknownpath on the other platforms).hasValidJsonRpcRequestIdmoved into the artifact codec (now shared/public) since both the generic client and the kit need it.Kit (
checkout-kit)CheckoutProtocol.Clientis now a thin wrapper over the generic client: it keeps Checkout Kit curation (only supported descriptors register), main-thread delivery of consumer handlers, and wiresonDecodeErrortolog.eonce. The duplicated decode/route/encode/catch code is gone. Public kit API is unchanged (lib.apiuntouched).The
embedded-checkout-protocol.apibaseline gainsClientandhasValidJsonRpcRequestId; that diff is intended.Usage
Directly against the protocol artifact (
com.shopify:embedded-checkout-protocol) — for a custom transport/WebView integration:Through Checkout Kit (
com.shopify:checkout-kit) — the managed path, wired into the kit's WebView automatically:The kit adds, on top of the generic client: payload unwrapping (
Checkoutvs rawCheckoutParams), descriptor curation (only supported events register), main-thread handler delivery, decode-error logging, and WebView wiring. The protocol client is the unopinionated primitive underneath.Before you merge
Important
platforms/swift/README.mdand/orplatforms/android/README.md)Releasing a new Swift version?
ShopifyCheckoutKit.podspecplatforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swiftplatforms/swift/README.md(major version only)Releasing a new Embedded Checkout Protocol version?
embeddedCheckoutProtocolAndroidinplatforms/android/gradle/libs.versions.tomlprotocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.apiif the public API changedReleasing a new Android version?
checkoutKitAndroidinplatforms/android/gradle/libs.versions.tomlplatforms/android/README.mdTip
See the Contributing documentation for the full release process per platform.