Repository navigation
Add Boot/gRPC version matrix to Gradle samples - #437
Merged
Merged
Conversation
Signed-off-by: kushagragarg55 <kushagra.garg55@gmail.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.
Resolves #300 (the remaining checklist item: add the Spring Boot and Spring gRPC versions to the Gradle samples workflow).
What this does
The Gradle samples now build against a small version matrix instead of a single hardcoded version, so they double as compatibility tests. The workflow runs the samples on the latest stable pair (Spring Boot 4.1.1 / Spring gRPC 1.1.1) and the latest snapshot pair (4.1.2-SNAPSHOT / 1.1.2-SNAPSHOT), each on Java 17 and 25. Java 24 handling for the Kotlin sample is preserved.
How the versions are injected
Per the discussion on the issue, the versions live in the sample build files using Boot's own tooling rather than an init script:
bootVersioninsamples/gradle.propertiesfeeds the Spring Boot Gradle plugin (id 'org.springframework.boot' version "$bootVersion") and is overridable with-PbootVersion.springGrpcVersionvariable (dead since the starters moved into Spring Boot) now overrides the Boot-managedspring-grpc.versionthroughext, but only when-PspringGrpcVersionis passed. Without it, Boot's pinned version wins, so a plain./gradlew buildbehaves exactly as before.The workflow passes both as a matrix axis, and
fail-fast: falselets each cell report independently.Verification
I ran the matrix on a fork. All four cells build and test green, and
dependencyInsightconfirms each cell resolves the intended version:In the snapshot cells, Boot's pinned 1.1.1 is overridden to 1.1.2-SNAPSHOT, which confirms the
extoverride takes effect.The mechanism also makes a mixed cell (stable Boot with snapshot Spring gRPC) a one-line matrix addition if you want to add it later.
Testing
Completed the test on a forked test branch - https://github.com/kushagragarg55/spring-grpc/actions/runs/37318002448