coralogix / sbt-protodep

SBT wrapper for protodep

Version Matrix

sbt-protodep

SBT plugin for importing protobuf definitions with protodep

Usage

In plugins.sbt:

addSbtPlugin("com.thesamet"  % "sbt-protoc" % "1.0.0-RC4")
libraryDependencies += "com.thesamet.scalapb.zio-grpc" %% "zio-grpc-codegen" % "0.4.2"
resolvers += "Sonatype OSS Snapshots" at "https://oss.sonatype.org/content/repositories/snapshots"
addSbtPlugin("com.coralogix"  % "sbt-protodep" % "0.0.8")

In build.sbt:

// This applies scalaVersion for the dynamic grpc-deps project
ThisBuild / scalaVersion := "2.13.3"

lazy val grpcDeps = Protodep.generateProject("grpc-deps")

lazy val root = (project in file("."))
  // ...
  .dependsOn(grpcDeps) // Depend on the generated client code

To use https instead of ssh set this in your build.sbt

Global / protodepUseHttps := true

In protodep.toml:

proto_outdir = "./grpc-deps/target/protobuf_external_src"

To update protobuf to the latest commit:

sbt grpc-deps/forcedProtodepUp