-
Notifications
You must be signed in to change notification settings - Fork 14
/
build.sbt
57 lines (53 loc) · 2.13 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
lazy val scala212 = "2.12.18"
lazy val scala213 = "2.13.7"
lazy val commonSettings = List(
scalaVersion := scala212,
scalacOptions ++= Seq(
"-encoding",
"utf8",
"-deprecation",
"-unchecked",
"-Xlint",
"-Xfatal-warnings"
),
Compile / console / scalacOptions --= Seq("-deprecation", "-Xfatal-warnings", "-Xlint")
)
lazy val codegen = (project in file("codegen"))
.enablePlugins(SbtPlugin, BuildInfoPlugin)
.settings(
commonSettings,
name := "twinagle-scalapb-plugin",
addSbtPlugin("com.thesamet" % "sbt-protoc" % "1.0.7"),
libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % scalapb.compiler.Version.scalapbVersion,
buildInfoKeys := Seq[BuildInfoKey](version, scalaBinaryVersion),
buildInfoPackage := "com.soundcloud.twinagle.codegen",
buildInfoUsePackageAsPath := true,
publishLocal := publishLocal.dependsOn(runtime / publishLocal).value,
scriptedLaunchOpts ++= Seq("-Xmx1024M", "-Dplugin.version=" + version.value),
scriptedBufferLog := false
)
lazy val runtime = (project in file("runtime")).settings(
commonSettings,
name := "twinagle-runtime",
crossScalaVersions := Seq(scala212, scala213),
libraryDependencies ++= Seq(
"com.twitter" %% "finagle-http" % "21.12.0",
"com.thesamet.scalapb" %% "scalapb-runtime" % scalapb.compiler.Version.scalapbVersion,
"com.thesamet.scalapb" %% "scalapb-json4s" % "0.12.1",
"org.json4s" %% "json4s-native" % "4.0.7",
"org.specs2" %% "specs2-core" % "4.20.5" % Test,
"org.specs2" %% "specs2-mock" % "4.20.5" % Test
),
// compile protobuf messages for unit tests
Project.inConfig(Test)(sbtprotoc.ProtocPlugin.protobufConfigSettings),
Test / PB.targets := Seq(
scalapb.gen(flatPackage = true) -> (Test / sourceManaged).value
)
)
lazy val root = (project in file("."))
.aggregate(runtime, codegen)
.settings(
name := "twinagle-root",
resolvers += Resolver.typesafeIvyRepo("releases"),
publish / skip := true
)