Split Android checkout protocol module#315
Draft
kiftio wants to merge 1 commit into
Draft
Conversation
Assisted-By: devx/6488e3d0-f47f-4171-a1c4-d2432b2a653c
Contributor
Author
This stack of pull requests is managed by Graphite. Learn more about stacking. |
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.

Goal
Split the Android Embedded Checkout Protocol ownership out of Checkout Kit into its own module.
This sits before the follow-up PR that hides the raw communication client/process entrypoints from Kit consumers. The aim here is to make protocol a reusable layer that Kit can depend on, without Kit owning all of the protocol models and dispatch code directly.
New Architecture
:checkout-protocolowns the typed ECP models,CheckoutProtocoldescriptors/client, JSON-RPC request handling helpers, serializers, protocol tests, and protocol API baseline.:libremains the Checkout Kit host layer: WebView presentation, lifecycle, default native handling, and Kit API surface.:libdepends on:checkout-protocolwithapi project(":checkout-protocol"), so normalcheckout-kitconsumers still receive the protocol types transitively.com.shopify.checkoutkitto avoid turning this into a package rename. The new Gradle namespace iscom.shopify.checkoutkit.protocol.com.shopify:checkout-protocol;com.shopify:checkout-kitdepends on it.Implementation Notes
include ":checkout-protocol"and a new Android library build for the protocol module.:lib: generated models,CheckoutProtocol,ExtendsSerializer, protocol tests, Robolectric config, and API baseline.:libfocused on host behaviour and wires it to the protocol module through Gradle.CheckoutProtocolInternalApifor lower-level helpers that need to cross the new Gradle module boundary.checkout-protocolandcheckout-kitfrom Maven Local.Most of the diff is file movement and API baseline movement. Behaviour is intended to stay the same in this PR.
Stack Notes
This PR creates the module split only.
The next branch in the stack tightens the public Kit API by hiding raw
CheckoutCommunicationClient.process(...)usage from consumers and routing them toward typed callbacks, for exampleclient.on(CheckoutProtocol.start) { ... }.Validation
Run while preparing this stack: