Migrate from Cargo-bundled Maven repository to GitHub-hosted Maven artifact repository - #251
Conversation
This must have the same structure as the Maven repo paths
7a4dd16 to
48fc34f
Compare
|
Ah I forgot one thing last week: Before this merges I want to test reverting the test-only workaround for CRL fetching failures and confirm the new manifest is working as intended in our CI environment: |
|
The commit history looks a bit messy? IMO the Kotlin formatting/lint stuff should be fixed in the same commit where the version that causes these to pop up is bumped. It's not clear to me why CI against 48fc34f failed but fixing that by reordering commits might be nice, too. |
Gradle/Android Studio will automatically merge this into any hosting applications including the library. In addition, now that this is present, we no longer need the test-only workaround for CRL fetching failures.
…rtifacts Start tracking Maven repository state data (backfilled from GitHub releases). This metadata file will be shared between the main branches and Maven archive branch in the future.
f8d49ea to
044fcd9
Compare
|
Good point on the commit history 😅. I squashed the Kotlin lint fixes and workaround removal into larger ones since I think neither of those make sense on their own because they are dependent on a bigger change. I also reordered history to have "fixing builds to make everything work" be before anything that changes Android Studio related things. |


This PR implements the plan that I outlined last year to redo the Android distribution channels (hopefully for the last time!) with a few improvements for simplicity.
We are switching from shipping AAR builds with Cargo releases to using
rustls-platform-verifier-androidas solely a version synchronization tool and distributing the AAR via a stateful Maven "local" repository that is going to be hosted in themaven-archivebranch of this repository. Gradle will depend on this remote filesystem structure transparently, treating it exactly like a regular Maven package registry.The
mainbranch of this repository (and any release branches) now hold amaven-metadata-local.xmlfile that contains the persistent state required for a Maven remote.mainis the source of truth for the data and during releases it gets copied into themaven-archivebranch to "enable" finding the newly built artifacts. This is also intended to prevent ever running into Git conflicts when switching between the two.This now means there shouldn't be anymore weird dependencies between the Rust part of this library and the Android part for downstream users who have a split between their Java libraries and actual host applications. Both can fetch from the same remote without any dependency on eachother and the final version of the Android component can be selected by the top-level app.
I tested this plan out in https://github.com/complexspaces/rustls-platform-verifier-android-sandbox originally with 1Password's Android app as the downstream user using the new README code snippets and all. Here's a screenshot of Android Studio showing successful version resolution and downloading of the AAR library:

More PRs follow this one to assemble the rest of the components and then demonstrate preparing for a new release using the updated process and releasing guide:
maven-archivebranch that artifacts will be served on in the future. It shares the metadata XML file owned by this branch.0.1.2release to Gradle clients over the network.Commit-by-commit review is heavily recommended.
Closes #115, #226