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
{{ message }}
Repository navigation
Commit 0e76b93
Browse filesBrowse the repository at this point in the historyBrowse files
@@ -113,83 +113,70 @@ let config = ClientConfig::builder_with_provider(arc_crypto_provider)
113
113
### Android
114
114
Some manual setup is required, outside of `cargo`, to use this crate on Android. In order to
115
115
use Android's certificate verifier, the crate needs to call into the JVM. A small Kotlin
116
-
component must be included in your app's build to support `rustls-platform-verifier`. If distributing a library, that component will need to be bundled into your release jar
117
-
[as it is not yet available on Maven](https://github.com/rustls/rustls-platform-verifier/issues/115).
116
+
component must be included in your app's build to support `rustls-platform-verifier`.
118
117
119
118
#### Gradle Setup
120
119
121
-
`rustls-platform-verifier`bundles the required native components in the crate, but the project must be setup to locate them
120
+
`rustls-platform-verifier`distributes the required native components in a Maven-compatible format via GitHub, but the project must be setup to locate them
122
121
automatically and correctly. These steps assume you are using `.gradle` Groovy files because they're the most common, but if you are using
123
122
Kotlin scripts (`.gradle.kts`) for configuration instead, an example snippet is included towards the end of this section.
124
123
125
-
Inside of your project's `build.gradle` file, add the following code and Maven repository definition. If applicable, this should only be the one "app" sub-project that
126
-
will actually be using this crate at runtime. With multiple projects running this, your Gradle configuration performance may degrade.
124
+
Each snippet includes a [`ValueSource`](https://docs.gradle.org/current/javadoc/org/gradle/api/provider/ValueSource.html) implementation that obtains a
125
+
Cargo-synchronized dependency version performantly, and is also friendly to Gradle's configuration cache. The version can be be selected manually instead,
126
+
but runtime crashes may occur if a SemVer incompatible version is used.
127
+
128
+
Inside of your project's `build.gradle` file, add the following code and Maven repository definition:
127
129
128
-
<details>
129
-
130
-
<summary>App Snippets</summary>
131
-
132
-
`$PATH_TO_DEPENDENT_CRATE` is the relative path to the Cargo manifest (`Cargo.toml`) of any crate in your workspace that depends on `rustls-platform-verifier` from
133
-
the location of your `build.gradle` file:
130
+
`$PATH_TO_LOCK_FILE` is the relative path to the Cargo lockfile of your crate or workspace (`Cargo.lock`).
*`--allow-dirty` is required because we don't check-in the generated Maven local repository.
31
-
6. (Optional) Inspect extracted archive to ensure the local Maven repository artifacts are present
32
-
1. Un-tar the `rustls-platform-verifier-android-*.crate` file inside of `target/package`.
33
-
2. Verify `maven/rustls/rustls-platform-verifier` contains a single `*.RELEASE` directory and that contains a `.aar` file.
34
-
3. (Optional) If the releaser has an external Gradle project that uses the configuration from the README, paste the path to the
35
-
unzipped package's `Cargo.toml` as a replacement for the `manifestPath` variable. Run a Gradle Sync and observe everything works.
36
-
7.**Ensure that all version changes are committed to the correct branch before proceeding**. All version increases should be checked in prior
27
+
3. Run `ci/package_android_release.sh` in a UNIX compatible shell
28
+
4. Commit the Maven metadata updates on their own: `git commit -am "Bump Maven release to x.x.x"`. Copy the new commit's short ID.
29
+
5.**Ensure that all version changes are committed to the correct branch before proceeding**. All version increases should be checked in prior
37
30
to publishing on crates.io.
38
-
8. Publish the Android artifacts' new version: `cargo publish -p rustls-platform-verifier-android --allow-dirty`
31
+
6. Checkout the Maven storage branch: `git checkout maven-archive`. The newly built artifacts are now ready to check in.
32
+
7. Add the new artifacts to storage: `git add . && git commit -m "Prepare Maven release x.x.x"`
33
+
8. Sync the Maven metadata to make the new artifacts visible: `git cherry-pick $MAVEN_BUMP_COMMIT_ID`
34
+
9. Publish the new changes:
35
+
*`git push && git checkout rel-xxx`
36
+
* Publish the new Android marker version: `cargo publish -p rustls-platform-verifier-android`
39
37
40
38
3. Commit main crate's version increase on the release branch
41
39
4.**Ensure that all version changes are committed to the correct branch before proceeding**. All version increases should be checked in prior
42
40
to publishing on crates.io.
43
41
5. Publish the main crate's new version: `cargo publish -p rustls-platform-verifier`
44
-
* Do **not** use `--allow-dirty` for the main crate. Only the Android component requires it and a dirty workspace elsewhere is an error.
45
42
6. Follow the remaining steps in [RELEASING] to create the appropiate version tag.
46
-
7. If a new Android component release was made: Before publishing the GitHub release, run `./ci/archive_android_release.sh` to create a reproducible archive
47
-
containing the Android Maven components that were just published to crates.io. After creating the archive, upload it as an additional release artifact on GitHub.
0 commit comments