fokot / sbt-protodep

SBT wrapper for protodep

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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"

addSbtPlugin("com.coralogix"  % "sbt-protodep" % "0.0.5")

In build.sbt:

// Enable the sbt-protodep plugin
enablePlugins(Protodep)

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

lazy val root = (project in file("."))
  // ...
  .dependsOn(LocalProject("grpc-deps")) // Depend on the generated client code

In protodep.toml:

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

To update protobuf to the latest commit:

sbt grpc-deps/forcedProtodepUp

About

SBT wrapper for protodep

License:Apache License 2.0


Languages

Language:Scala 99.4%Language:Shell 0.6%