https://github.com/aiyanbo/sbt-protoc
🔢 A plugin for sbt that transforms *.proto files to Java source files
https://github.com/aiyanbo/sbt-protoc
grpc-java protobuf-java protobuf3 sbt-plugin
Last synced: 5 months ago
JSON representation
🔢 A plugin for sbt that transforms *.proto files to Java source files
- Host: GitHub
- URL: https://github.com/aiyanbo/sbt-protoc
- Owner: aiyanbo
- License: apache-2.0
- Created: 2018-08-11T09:18:00.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-05-13T08:30:21.000Z (about 6 years ago)
- Last Synced: 2025-02-23T14:15:18.631Z (over 1 year ago)
- Topics: grpc-java, protobuf-java, protobuf3, sbt-plugin
- Language: Scala
- Homepage:
- Size: 62.5 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# sbt-protoc
A plugin for sbt that transforms *.proto files to Java source files.
[](https://travis-ci.org/aiyanbo/sbt-protoc)
[](https://github.com/aiyanbo/sbt-protoc/releases/latest)
# Features
- Support protobuf3
- Support gRPC
- Auto upgrade gRPC and protobuf-java libs
# Usage
#### Adding the plugin dependency
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")
```
#### Enabled sbt-protc plugin
**build.sbt**
```
enablePlugins(ProtocPlugin)
```
#### Additional protobuf sources in your project
```
|- project
|---- src/mian/proto
|-------- hello.proto
```
# Settings
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.
# Credits
- [sbt-protobuf](https://github.com/sbt/sbt-protobuf)