Bootstraps the project with com.google.protobuf gradle plugin (including grpc protoc plugin) and io.github.lognet:grpc-spring-boot-starter
plugins {
id 'java'
id "io.github.lognet.grpc-spring-boot" version '5.2.0'
}Your project is configured to :
-
Generate
protoandgrpcclasses for each.protofile under${sourceSet}/protofolder for all source sets :-
src/main/java/proto/*.proto -
src/main/test/proto/*.proto -
src/main/myCustomSourset/proto/*.proto.by applying
com.google.protobufgradle plugin.
-
-
All generated source files are added to your project’s source sets (find them under
$buildDir/protoGenfolder ) -
io.github.lognet:grpc-spring-boot-starteris added toimplementationconfiguration dependencies.
All settings are optional (have reasonable defaults):
grpcSpringBoot {
grpcSpringBootStarterVersion.set("X.X.X")// (1)
grpcVersion.set("X.X.X")//(2)
protocVersion.set("X.X.X")//(3)
reactiveFeature.set(ReactiveFeature.REACTOR)//(4)
reactiveProtocVersion.set("X.X.X")//(5)
}-
io.github.lognet:grpc-spring-boot-starterversion to use, defaults to the same version as this plugin. -
grpcversion to use, defaults to the version theio.github.lognet:grpc-spring-boot-starterwas compiled with (see version matrix here) -
Version of
com.google.protobuf:protocprotocol compiler to use (defaults to3.25.5) -
Enables salesforce’s reactive-grpc protoc plugin, defaults to
ReactiveFeature.OFF(supportsReactiveFeature.REACTORandReactiveFeature.RX) -
reactive-grpcversion to use, defaults to1.2.4
The version of com.google.protobuf can be controlled via pluginManagement block :
pluginManagement {
plugins {
id 'com.google.protobuf' version "X.X.X"//(1)
}
}-
Defaults to
0.9.4.