A plugin for sbt that transforms *.proto files to Java source files.
- Support protobuf3
- Support gRPC
- Auto upgrade gRPC and protobuf-java libs
In your project, create a file for plugin library dependencies project/plugins.sbt and add the following line:
addSbtPlugin("org.jmotor.sbt" % "sbt-protoc" % "1.0.16")
build.sbt
enablePlugins(ProtocPlugin)
|- project
|---- src/mian/proto
|-------- hello.proto
Add settings like this:
protocIncludeStdTypes in ProtocConfig := false
name | default | description |
---|---|---|
protocVersion | latest | protoc version |
protocGrpcVersion | latest | grpc version, if you not set used the latest. |
protocIncludeStdTypes | true | include google/protobuf protos. |