Gradle gRPC support fails if protobuf-java dependency is used instead of protobuf-java-util#50405
Merged
philwebb merged 2 commits intoMay 12, 2026
Conversation
Simplify the stream logic to make use of `getAllComponents()` rather than using `getAllDependencies()` and `DependencyResult::getFrom`. See spring-projectsgh-50405
Update `ProtobufPluginAction` to align the protoc version with `protobuf-java` rather than `protobuf-java-util`. The util jar is only required for server gRPC code. See spring-projectsgh-50405 Signed-off-by: Dongliang Xie <dragonfsky@gmail.com>
68395ca to
6d307ed
Compare
Member
|
Thanks very much @DragonFSKY. I've applied this to main, but I split it into two commits (one for the stream simplification and one for the fix). |
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.
Fixes #50401.
This updates the Protobuf Gradle plugin action to align
protocwithcom.google.protobuf:protobuf-javarather thanprotobuf-java-util. The gRPC client starter brings inprotobuf-javabut notprotobuf-java-util, so the previous alignment could leaveprotocwith a null version.The integration test fixture now uses
protobuf-java, and agenerateProtocoverage case with a proto source file verifies the client-style setup.Tests:
./gradlew :build-plugin:spring-boot-gradle-plugin:test --tests org.springframework.boot.gradle.plugin.ProtobufPluginActionIntegrationTests --rerun-tasks./gradlew :build-plugin:spring-boot-gradle-plugin:test --tests org.springframework.boot.gradle.plugin.ProtobufPluginActionIntegrationTests :build-plugin:spring-boot-gradle-plugin:checkFormatMain :build-plugin:spring-boot-gradle-plugin:checkFormatTest :build-plugin:spring-boot-gradle-plugin:checkstyleMain :build-plugin:spring-boot-gradle-plugin:checkstyleTest