Allow redirecting to unreleased androidx builds - #3283
Draft
Ivan Matkov (MatkovIvan) wants to merge 1 commit into
Draft
Allow redirecting to unreleased androidx builds#3283Ivan Matkov (MatkovIvan) wants to merge 1 commit into
Ivan Matkov (MatkovIvan) wants to merge 1 commit into
Conversation
A library state could only be merged into jb-main after Google published it to Google Maven, because that is the first moment the redirect target of an artifact redirection becomes resolvable. Google publishes every build cut to androidx.dev about a week earlier, but pointing the fork at it by hand needs an unfiltered repository: one build's repository answers for every androidx coordinate, and since library groups are released from different commits while sharing the version string X.Y.Z-SNAPSHOT, a group pinned to one build silently resolves from another. Record the build instead. redirectversions.toml gains an optional [[snapshots]] array keyed by androidx.dev build id, listing the group prefixes whose [versions] entry is a -SNAPSHOT. RedirectVersionsService parses and validates it: every listed group exists in [versions] and is a -SNAPSHOT, every -SNAPSHOT is listed exactly once, and the repository flavour is known. Each entry becomes one maven repository filtered on group prefix AND exact version, so overlapping prefixes and two groups on two builds stay separated, and a released version is never accepted by a snapshot repository. The repositories are declared from settings-fork.gradle, the single site that configures project repositories, via a new fork-only script rather than repos.gradle: that file is shared byte-identically with AOSP and also configures buildscript classpaths, which never resolve redirect coordinates. The script carries its own tomlj classpath because a settings buildscript classpath is not visible to the script plugins applied from it. jbVerifyDependencyVersions ranks a -SNAPSHOT below every publishable version, which would fail the Dev and personal Snapshot pipelines as hard as Release and defeat the purpose. Exempt a dependency only when the project version carries semver build metadata -- which a public release version never does -- and the dependency matches a registered snapshot prefix at its exact recorded version. Deliberately left out: automating the flip back to released versions, and any relaxation of the release gate. A snapshot-backed state must not reach a public release, and androidx.dev per-build repositories are not kept forever. printAndroidxSnapshots feeds the same registry to the Gradle plugin build of compose-multiplatform, so a dev build that redirects to snapshots stays consumable outside this repository.
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.
CMP-10349 Allow merging non-release commits into jb-main
Release Notes
N/A