fix(matrix): Fetch AGP<->Gradle compat from Android Studio source#1165
Merged
fix(matrix): Fetch AGP<->Gradle compat from Android Studio source#1165
Conversation
The developer.android.com compatibility page Google publishes is not always kept up-to-date, and relying on it meant our CI matrix fell back to release-notes scraping for newly released AGP versions. Pull the mapping directly from Android Studio's CompatibleGradleVersion.kt (the source of truth) and resolve VERSION_FOR_DEV via SdkConstants.GRADLE_LATEST_VERSION so bleeding-edge AGP pre-releases pick up the right Gradle version. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Switch the CI matrix generator from scraping developer.android.com to pulling the AGP↔Gradle compatibility mapping directly from Android Studio's
CompatibleGradleVersion.kt.Google's public compatibility page lags behind actual AGP releases, which meant
fetchAgpCompatibilityTablekept falling through to the release-notes fallback for new versions.CompatibleGradleVersion.ktis the source of truth the IDE itself uses, so it tracks new AGP minors immediately.The file is fetched raw via gitiles
?format=TEXT(base64 decode) and parsed with regex for the enum declarations andAGP_MAJOR_MINOR_TO_GRADLE_MAP.VERSION_FOR_DEVis resolved separately by fetchingSdkConstants.GRADLE_LATEST_VERSIONfrom the siblingtools/baserepo, so bleeding-edge AGP pre-releases pick up the correct milestone Gradle.fetchGradleVersionFromReleaseNotesstays in place as a fallback in case a brand-new AGP version shows up before the Android Studio mirror updates.Verified locally:
GRADLE_LATEST_VERSION)#skip-changelog