-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
38 lines (29 loc) · 1.21 KB
/
build.sbt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import scala.sys.process._
import scalapb.compiler.Version.scalapbVersion
ThisBuild / organization := "io.github.jamiees2"
ThisBuild / version := s"1.23.0-dev-f04150-1"
ThisBuild / description := "ScalaPB generated bindings for Envoy"
crossScalaVersions := Seq("2.12.16", "2.13.8")
name := "envoy-scala-control-plane"
PB.protocVersion := "3.15.0"
Compile / PB.protocOptions := Seq("--experimental_allow_proto3_optional")
Compile / PB.targets := Seq(
scalapb.gen(flatPackage=true) -> (Compile / sourceManaged).value
)
libraryDependencies ++= Seq(
"io.grpc" % "grpc-netty" % scalapb.compiler.Version.grpcJavaVersion,
// For finding google/protobuf/descriptor.proto
"com.thesamet.scalapb" %% "scalapb-runtime" % scalapbVersion % "protobuf",
"com.thesamet.scalapb" %% "scalapb-runtime-grpc" % scalapbVersion,
"com.thesamet.scalapb" %% "scalapb-json4s" % "0.11.1"
)
Compile / packageSrc / mappings ++= {
val base = (Compile / sourceManaged).value
val files = (Compile / managedSources).value
files.map { f => (f, f.relativeTo(base).get.getPath) }
}
lazy val updateApi = taskKey[Unit]("Downloads the API sources (from the envoy repo)")
updateApi := {
s"./update-api.sh" !
}
publishTo := sonatypePublishToBundle.value