Skip to content

Preserve exact Gradle wrapper versions - #560

Open
radiantjade wants to merge 1 commit into
railwayapp:mainfrom
radiantjade:preserve-gradle-wrapper-version
Open

Preserve exact Gradle wrapper versions#560
radiantjade wants to merge 1 commit into
railwayapp:mainfrom
radiantjade:preserve-gradle-wrapper-version

Conversation

@radiantjade

Copy link
Copy Markdown
Contributor

Fixes #554.

This passes the full Gradle version pinned in gradle/wrapper/gradle-wrapper.properties through to mise instead of truncating it to the major version. That avoids latest <major> resolution selecting newer milestones or previews when the wrapper is pinned to an exact stable version.

The wrapper URL parser now captures versions from gradle-<version>-bin.zip and gradle-<version>-all.zip, including patch and prerelease suffixes.

Verification:

  • go test ./core/providers/java
  • go test ./core -run 'TestGenerateBuildPlanForExamples/java-gradle'\n- git diff --cached --check

Railpack should pass the version pinned in gradle-wrapper.properties through to mise instead of truncating it to the major version. Major-only resolution can select newer milestones or previews that the project did not request.

Constraint: Gradle wrapper distribution URLs are the authoritative version source for Gradle wrapper projects.

Rejected: Keep major-only parsing | allows mise latest-major resolution to drift to prerelease versions.

Confidence: high

Scope-risk: narrow

Tested: go test ./core/providers/java

Tested: go test ./core -run 'TestGenerateBuildPlanForExamples/java-gradle'

Tested: git diff --cached --check

@iloveitaly iloveitaly left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the contribution! Would it be possible to add an example project (examples/, we have something for gradle in there already) which covers this logic?

We are a big fan of additional integration tests (via example projects) for this sort of thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Java provider: gradle wrapper version is truncated to major-only, causing mise to install milestone previews

2 participants