Skip to content

0.8.0

Latest
Compare
Choose a tag to compare
@eed3si9n eed3si9n released this 08 Mar 04:54
v0.8.0
cb2d7e6

Using Coursier to resolve protoc and gRPC support

Previously sbt-protobuf used protoc-jar to resolve protoc. sbt-protobuf 0.8.0 uses Coursier instead to resolve the protoc CLI executable. This has the benefit of respecting the resolvers setting if you're behind a Maven proxy. In addition, sbt-protobuf 0.8.0 adds protobufGrpcEnabled setting to enable gRPC compilation:

protobufGrpcEnabled := true

See https://github.com/sbt/sbt-protobuf/tree/main/src/sbt-test/sbt-protobuf/grpc for details. This was contributed by @eed3si9n in #177.

Using Glob(...) for protobufExcludeFilters

sbt-protobuf 0.8.0 adds new settings protobufIncludeFilters and protobufExcludeFilters, which uses Glob(...) feature that was added in sbt 1.3.x. Unlike excludeFilter, which works only to filter out certain file extensions the glob extension can be used to exclude *.proto files in some directories. The default exclude filter has something like this:

ProtobufConfig  / protobufExcludeFilters ++= {
  val dirs = (ProtobufConfig  / sourceDirectories).value
  dirs.map(d => Glob(d.toPath()) / "google" / "protobuf" / "*.proto")
}

This is useful when you extend the *.proto sources to (ProtobufConfig / protobufExternalIncludePath).value, and some of the schemata have precompiled Java modules. This was contributed by @eed3si9n in #175.

Full Changelog: v0.7.3...v0.8.0