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: CONTRIBUTING.md
+50-34Lines changed: 50 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -120,6 +120,47 @@ In the project where you want to use the updated library:
120
120
> - The `mavenLocal()` repository should typically be used only during development to avoid conflicts with published versions in remote repositories.
121
121
> - Remember to remove `mavenLocal()` and revert the version before committing your changes.
122
122
123
+
## Publishing to Maven Central
124
+
125
+
> [!IMPORTANT]
126
+
> Publishing to Maven Central should only be done after merging a release PR and creating a release tag.
127
+
> Use the [GitHub Actions workflow](https://github.com/ably/ably-chat-kotlin/actions/workflows/release.yaml) to publish releases (see Step 11 in the [Release Process](#release-process)).
128
+
> The instructions below are for reference and manual publishing in exceptional circumstances only.
129
+
130
+
### Prerequisites for Publishing to Maven Central
131
+
132
+
Ensure you have the following configured in your `~/.gradle/gradle.properties`:
133
+
134
+
1. Sonatype OSSRH account credentials:
135
+
```properties
136
+
mavenCentralUsername=user-token-username
137
+
mavenCentralPassword=user-token-password
138
+
```
139
+
2. GPG key for signing artifacts:
140
+
141
+
- Generate a key pair if you don't have one: `gpg --gen-key`
> The CI workflow (`.github/workflows/release.yaml`) uses in-memory signing with environment variables instead of file-based signing:
159
+
> -`ORG_GRADLE_PROJECT_signingInMemoryKey` - The GPG private key
160
+
> -`ORG_GRADLE_PROJECT_signingInMemoryKeyId` - The GPG key ID
161
+
> -`ORG_GRADLE_PROJECT_signingInMemoryKeyPassword` - The GPG key password
162
+
163
+
123
164
## Documentation
124
165
125
166
The source of truth for documentation for the Ably Chat SDKs can be found on the [Ably Docs repository](https://github.com/ably/docs).
@@ -130,17 +171,14 @@ Any releases must be accompanied by a PR to bump the library install version in
130
171
131
172
## Validate website docs snippet changes
132
173
133
-
As part of the [release process](#release-process) (see Step 5), you should validate that the web documentation code snippets are accurate
134
-
and up-to-date with the SDK source code. This is done by running the following prompt against a locally cloned copy of the
135
-
[ably/docs](https://github.com/ably/docs) repository and this SDK repository.
174
+
To validate that the web documentation code snippets are accurate and up-to-date with the SDK source code, run the following prompt against a locally cloned copy of the [ably/docs](https://github.com/ably/docs) repository and this SDK repository.
136
175
137
176
> [!IMPORTANT]
138
177
> This prompt should be run with the most powerful LLM available to you (e.g. Claude Opus, GPT-4, etc.) for the best results.
139
178
140
-
Replace `{DOCS_PATH}` with the path to your local clone of the [ably/docs](https://github.com/ably/docs) repository, `{SDK_NAME}` with
141
-
`ably-chat-kotlin`, and `{SDK_PATH}` with the path to your local clone of this SDK repository.
179
+
Replace `{DOCS_PATH}` with the path to your local clone of the [ably/docs](https://github.com/ably/docs) repository, `{SDK_NAME}` with `ably-chat-kotlin`, and `{SDK_PATH}` with the path to your local clone of this SDK repository.
142
180
143
-
~~~
181
+
```text
144
182
Verify all `kotlin` and `android` annotated code snippets in `.mdx` files located at `{DOCS_PATH}` against the `{SDK_NAME}` source code repository at `{SDK_PATH}`.
145
183
146
184
### Verification Steps:
@@ -155,8 +193,8 @@ Verify all `kotlin` and `android` annotated code snippets in `.mdx` files locate
155
193
- Namespaces and import requirements
156
194
157
195
3. **Cross-check each snippet** for the following issues:
- **Naming conventions**: Verify casing matches the language conventions (e.g., PascalCase for C# properties, camelCase for JavaScript)
196
+
- **Syntax errors**: Incorrect object construction (Kotlin uses `MyClass()` not `new MyClass()`), missing `suspend` modifier, missing `val`/`var` for declarations, incorrect lambda syntax, incorrect null-safety operators (`?.`, `!!`, `?:`)
197
+
- **Naming conventions**: Verify casing matches Kotlin conventions (`PascalCase` for classes/objects/enums, `camelCase` for functions/properties/variables, `SCREAMING_SNAKE_CASE` for `const val` constants)
160
198
- **API accuracy**: Verify method names, property names, and enum values exist in the SDK
161
199
- **Type correctness**: Verify correct types are used (e.g., `ConnectionEvent` vs `ConnectionState`)
162
200
- **Namespace/import requirements**: Note any required imports that are missing from examples
@@ -175,7 +213,7 @@ Verify all `kotlin` and `android` annotated code snippets in `.mdx` files locate
175
213
176
214
### Output Format:
177
215
Create/update a markdown report file `chat_kotlin_api_verification_report.md` with all findings.
178
-
~~~
216
+
```
179
217
180
218
## Release Process
181
219
@@ -198,34 +236,12 @@ This library uses [semantic versioning](http://semver.org/). For each release, t
198
236
- Also ensure that the "Full Changelog" link points to the new version tag instead of the `HEAD`.
199
237
200
238
4. Commit [CHANGELOG](./CHANGELOG.md)
201
-
5. Run the [Validate website docs snippet changes](#validate-website-docs-snippet-changes) locally to verify that all `kotlin` and `android` code
202
-
snippets in the [web documentation](https://github.com/ably/docs) are accurate and up-to-date with the SDK source code. Review the generated report and fix any issues found.
203
-
6. Create a PR on the [website docs](https://github.com/ably/docs), [website snippets](https://github.com/ably/website) and
204
-
[voltaire snippets](https://github.com/ably/voltaire/) that updates the SDK version in the setup/installation guide. Additionally, include fixes for any documentation issues identified in Step 5. Even if there are no public API changes, a PR must still be created to update the
205
-
SDK version.
239
+
5. If you’ve deprecated any public methods or properties, made changes to public interfaces, or are uncertain about the impact of your updates, run the [Validate website docs snippet changes](#validate-website-docs-snippet-changes) task locally. This will verify that the `kotlin` or `android` code snippets in the web documentation (https://github.com/ably/docs) are accurate and aligned with the current SDK source. Review the generated report and address any issues it identifies.
240
+
6. Create a PR on the [website docs](https://github.com/ably/docs) that updates the SDK version in the setup/installation guide. Additionally, include fixes for any documentation issues identified in the previous step. Even if there are no public API changes, a PR must still be created to update the SDK version.
206
241
7. Make a PR against `main`
207
242
8. Once the PR is approved, merge it into `main`
208
243
9. Add a tag to the new `main` head commit and push to origin such as `git tag v1.2.4 && git push origin v1.2.4`
209
244
10. Visit [https://github.com/ably/ably-chat-kotlin/tags](https://github.com/ably/ably-chat-kotlin/tags) and add release notes for the release including links to the changelog entry.
210
245
11. Use the [GitHub action](https://github.com/ably/ably-chat-kotlin/actions/workflows/release.yaml) to publish the release. Run the workflow on the release tag created in Step 9.
211
-
12. Merge any [website docs](https://github.com/ably/docs) PRs related to the changes, including the one you created in Step 6.
246
+
12. Merge any [website docs](https://github.com/ably/docs) PRs related to the changes created in Step 6.
212
247
13. Create the entry on the [Ably Changelog](https://changelog.ably.com/) (via [headwayapp](https://headwayapp.co/))
213
-
214
-
### Publishing to Maven Central
215
-
216
-
Ensure you have the following configured in your `~/.gradle/gradle.properties`:
217
-
218
-
1. Sonatype OSSRH account credentials:
219
-
```properties
220
-
mavenCentralUsername=user-token-username
221
-
mavenCentralPassword=user-token-password
222
-
```
223
-
2. GPG key for signing artifacts:
224
-
225
-
- Generate a key pair if you don't have one: `gpg --gen-key`
0 commit comments