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.1.5'
}
Your project is configured to :
-
Generate
proto
andgrpc
classes for each.proto
file under${sourceSet}/proto
folder for all source sets :-
src/main/java/proto/*.proto
-
src/main/test/proto/*.proto
-
src/main/myCustomSourset/proto/*.proto
.by applying
com.google.protobuf
gradle plugin.
-
-
All generated source files are added to your project’s source sets (find them under
$buildDir/protoGen
folder ) -
io.github.lognet:grpc-spring-boot-starter
is added toimplementation
configuration 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-starter
version to use, defaults to the same version as this plugin. -
grpc
version to use, defaults to the version theio.github.lognet:grpc-spring-boot-starter
was compiled with (see version matrix here) -
Version of
com.google.protobuf:protoc
protocol compiler to use (defaults to3.21.7
) -
Enables salesforce’s reactive-grpc protoc plugin, defaults to
ReactiveFeature.OFF
(supportsReactiveFeature.REACTOR
andReactiveFeature.RX
) -
reactive-grpc
version to use, defaults to1.2.3
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.1
.