You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: .github/CONTRIBUTING.md
+12-7Lines changed: 12 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -150,12 +150,17 @@ To check for lint issues without auto-correcting:
150
150
151
151
### Public API surface
152
152
153
-
The library's public API is tracked via a committed baseline at `platforms/android/lib/api/lib.api`, managed by the [binary-compatibility-validator](https://github.com/Kotlin/binary-compatibility-validator) Gradle plugin. The unified `Breaking Changes` CI workflow runs `./gradlew :lib:apiCheck` on every PR that touches Android sources and fails if the compiled public API diverges from the baseline.
153
+
The Android-facing public APIs are tracked via committed baselines managed by the [binary-compatibility-validator](https://github.com/Kotlin/binary-compatibility-validator) Gradle plugin:
154
+
155
+
-`platforms/android/lib/api/lib.api` for `com.shopify:checkout-kit`.
156
+
-`protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api` for `com.shopify:embedded-checkout-protocol`.
157
+
158
+
The unified `Breaking Changes` CI workflow runs `./gradlew apiCheck` on every PR that touches Android or Kotlin protocol sources and fails if the compiled public API diverges from the baselines.
154
159
155
160
If your change intentionally modifies the public API:
156
161
157
-
1. Run `dev android api dump` from the repo root (or `./gradlew :lib:apiDump` from `platforms/android/`) to regenerate the baseline.
158
-
2. Review the diff in `platforms/android/lib/api/lib.api` alongside your code changes.
162
+
1. Run `dev android api dump` from the repo root (or `./gradlew apiDump` from `platforms/android/`) to regenerate the baselines.
163
+
2. Review the relevant `.api` diff alongside your code changes.
159
164
3. Commit the updated `.api` file in the same PR.
160
165
161
166
If you did _not_ intend to change public API and `apiCheck` is failing, the diff shows what your change inadvertently affected — treat it as a signal that something in your PR has consumer-visible impact.
@@ -164,16 +169,16 @@ If you did _not_ intend to change public API and `apiCheck` is failing, the diff
164
169
165
170
Open a pull request with the following changes:
166
171
167
-
1. Bump the `versionName` in `platforms/android/lib/build.gradle`.
172
+
1. Bump `checkoutKitAndroid` in `platforms/android/gradle/libs.versions.toml`.
168
173
2. Add an entry to the top of `platforms/android/CHANGELOG.md`.
169
-
3.If the React Native package should consume this Android SDK release, update `checkoutKit.nativeSdkVersions.android` in `platforms/react-native/modules/@shopify/checkout-kit-react-native/package.json` to the same version.
174
+
3.Update `checkoutKit.nativeSdkVersions.android` in `platforms/react-native/modules/@shopify/checkout-kit-react-native/package.json` to the same lowercase SemVer.
170
175
171
176
Supported release versions are `X.Y.Z` and prerelease versions are `X.Y.Z-{alpha|beta|rc}.N`.
172
177
173
178
Once merged, run the [Release package workflow](../../actions/workflows/release.yml):
174
179
175
180
1. Select `Android` as the platform.
176
-
2. Enter the expected version. The workflow reads the SDK version from `platforms/android/lib/build.gradle` and fails if the typed version does not match.
181
+
2. Enter the expected version. The workflow reads the SDK version from `platforms/android/gradle/libs.versions.toml` and fails if the typed version does not match.
177
182
3. Select `Dry run` first to review the release plan without creating a release.
178
183
4. Rerun with `Draft release` to create a draft GitHub Release with the `android/`-prefixed tag (e.g. `android/3.0.1`) for human review.
179
184
5. Publish the draft release when ready. Publishing the draft kicks off the [Android publish workflow](../../actions/workflows/android-publish.yml). **A manual approval by a maintainer is required before publication to Maven Central.**
@@ -195,7 +200,7 @@ The React Native package reads its published native SDK dependency versions from
195
200
}
196
201
```
197
202
198
-
When updating the Swift or Android SDK version that React Native should consume, update the matching `checkoutKit.nativeSdkVersions` entry in this package file. These values drive `RNShopifyCheckoutKit.podspec` for iOS and the module/sample Gradle dependencies for Android, so they must stay aligned with the published native SDK versions used by the React Native release.
203
+
When updating the Swift or Android SDK version that React Native should consume, update the matching `checkoutKit.nativeSdkVersions` entry in this package file. These values drive `RNShopifyCheckoutKit.podspec` for iOS and the module/sample Gradle dependencies for Android, so they must stay aligned with the published native SDK versions used by the React Native release. Android CI uses the published Maven artifact by default, so `nativeSdkVersions.android` must stay on the published `com.shopify:checkout-kit` lowercase SemVer, not the Kotlin protocol calver.
protocol/ # cross-platform communication layer based on UCP
@@ -49,6 +49,7 @@ This applies when changes are made under:
49
49
50
50
- `platforms/swift/` — the iOS Swift SDK / CocoaPods sources
51
51
- `platforms/android/` — the Android SDK / Maven artifact sources
52
+
- `protocol/languages/kotlin/` — Kotlin protocol artifacts consumed by the Android SDK
52
53
53
54
It does **not** refer to the React Native wrapper platform folders:
54
55
@@ -58,18 +59,18 @@ It does **not** refer to the React Native wrapper platform folders:
58
59
### What `--local` does
59
60
60
61
- For React Native iOS, `--local` wires CocoaPods to the in-repo `platforms/swift/` sources via a local path instead of a released pod version.
61
-
- For React Native Android, `--local` publishes/uses the in-repo `platforms/android/` SDK through Maven Local so Gradle resolves the local SDK artifact instead of a released Maven version.
62
+
- For React Native Android, `--local` publishes/uses the in-repo Android SDK and Kotlin protocol artifacts through Maven Local so Gradle resolves the local `com.shopify:checkout-kit` and `com.shopify:embedded-checkout-protocol` artifacts instead of released Maven versions.
62
63
63
64
### When to use it
64
65
65
66
Use `--local` whenever you are validating React Native behavior that depends on unreleased native SDK changes, for example:
66
67
67
68
- a new Swift SDK API that the React Native iOS bridge calls
68
69
- a new Android SDK API that the React Native Android bridge calls
69
-
- generated protocol/model changes under the native SDKs that the React Native module consumes
70
-
- any change in `platforms/swift/` or `platforms/android/` that has not yet been released and consumed through normal dependency versions
70
+
- generated protocol/model changes under `protocol/languages/kotlin/` that the React Native module consumes through Android
71
+
- any change in `platforms/swift/`, `platforms/android/`, or `protocol/languages/kotlin/` that has not yet been released and consumed through normal dependency versions
71
72
72
-
Re-run the relevant local workflow whenever `platforms/swift/` or `platforms/android/` changes, because the React Native sample/tests need to re-resolve those local native SDK sources/artifacts.
73
+
Re-run the relevant local workflow whenever `platforms/swift/`, `platforms/android/`, or `protocol/languages/kotlin/` changes, because the React Native sample/tests need to re-resolve those local native SDK sources/artifacts.
73
74
74
75
```bash
75
76
# iOS sample using local platforms/swift sources
@@ -79,11 +80,11 @@ dev rn ios --local
79
80
dev rn android --local
80
81
81
82
# React Native Android unit tests using local platforms/android via Maven Local
82
-
# `dev rn test android` publishes platforms/android/lib to ~/.m2 first, then runs the RN module tests.
83
+
# `dev rn test android` publishes the Android SDK artifacts to ~/.m2 first, then runs the RN module tests.
83
84
dev rn test android
84
85
```
85
86
86
-
For ad-hoc Android Gradle test commands, publish the local Android SDK first and set `USE_LOCAL_SDK=1` so the React Native module resolves `com.shopify:checkout-kit:1.0.0`from Maven Local instead of the unreleased placeholder artifact:
87
+
For ad-hoc Android Gradle test commands, publish the local Android SDK first and set `USE_LOCAL_SDK=1` so the React Native sample resolves the local `com.shopify:checkout-kit` and `com.shopify:embedded-checkout-protocol` artifacts from Maven Local:
The React Native Android sample uses exclusive Maven Local resolution for those two `com.shopify` modules when `USE_LOCAL_SDK=1`. Keep that filtering in the sample Gradle build; duplicating exclusive repository filters for the same modules elsewhere can break dependency resolution.
97
+
95
98
## Sensitive configuration
96
99
97
100
Treat storefront environment and generated sample app configuration values as
0 commit comments