aiyanbo / sbt-protoc

🔢 A plugin for sbt that transforms *.proto files to Java source files

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

sbt-protoc

A plugin for sbt that transforms *.proto files to Java source files.

Build Status GitHub release

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

About

🔢 A plugin for sbt that transforms *.proto files to Java source files

License:Apache License 2.0


Languages

Language:Scala 95.9%Language:Java 2.6%Language:Shell 1.5%