ci: pin regenerated Gradle wrapper to 8.13 (unbreak builds)#16
Merged
Conversation
setup-gradle now provides Gradle 9.6.0, and the 'gradle wrapper' step (run to regenerate the gitignored wrapper jar) was rewriting the wrapper to 9.6.0 - which AGP 8.13.2 cannot run on (it relies on a Gradle internal API removed in 9.6.0). Every PR + release build started failing at plugin apply. Pass --gradle-version 8.13 so the wrapper regenerates at the project's pinned version regardless of setup-gradle's default.
The 'gradle wrapper' step runs under setup-gradle's Gradle, which (at 9.6.0) configures the AGP 8.13.2 project and fails at plugin apply before it can rewrite the wrapper - so --gradle-version on the wrapper command didn't help. Pin setup-gradle's provisioned Gradle to 8.13 so every CI Gradle invocation matches the project (and local builds).
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.
CI started failing on every PR/release at Gradle plugin apply:
Cause:
gradle/actions/setup-gradlenow provides Gradle 9.6.0 by default. Our workflows rungradle wrapperto regenerate the gitignored wrapper jar, and without--gradle-versionthat rewritesgradle-wrapper.propertiesto 9.6.0 - but the project is on AGP 8.13.2, which can't run on Gradle 9.6.0. The committed wrapper pins 8.13; the CI step was overriding it.Fix: pass
--gradle-version 8.13to all fourgradle wrappersteps (pr-checks, dev-release, tagged-release x2) so the wrapper regenerates at the pinned version regardless of setup-gradle's default.This PR's own Unit-tests check runs the patched workflow, so a green check here confirms the fix. Not a code change.