-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
72 lines (64 loc) · 2.24 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import sbt.Keys.libraryDependencies
import NativePackagerHelper._
name := "akka-typed-by-example"
version := "0.3"
lazy val akkaVersion = "2.6.4"
lazy val scalatestVersion = "3.1.1"
lazy val leveldbVersion = "1.8"
lazy val betterFilesVersion = "3.8.0"
lazy val logbackVersion = "1.2.3"
lazy val typeSafeConfig = "1.4.0"
lazy val scoptVersion = "3.7.1"
lazy val commonSettings = Seq(
version := "0.0.2",
fork := true,
scalaVersion := "2.13.1"
)
lazy val root = Project("root", file("."))
.aggregate(protobufApi, server, client)
lazy val protobufApi = (project in file("protobuf-api"))
.settings(
commonSettings
)
lazy val server = (project in file("server"))
.enablePlugins(AkkaGrpcPlugin, JavaAgent, JavaAppPackaging)
.settings(
PB.protoSources in Compile += (resourceDirectory in(protobufApi, Compile)).value,
akkaGrpcGeneratedLanguages := Seq(AkkaGrpc.Scala),
akkaGrpcGeneratedSources := Seq(AkkaGrpc.Server)
)
.settings(
commonSettings,
javaAgents += "org.mortbay.jetty.alpn" % "jetty-alpn-agent" % "2.0.9" % "runtime;test",
mainClass in (Compile, packageBin) := Some(
"example.server.Main"
),
libraryDependencies ++= Seq(
"com.typesafe.akka" %% "akka-persistence-typed" % akkaVersion,
"com.typesafe.akka" %% "akka-stream-typed" % akkaVersion,
"com.typesafe.akka" %% "akka-discovery" % akkaVersion, // Forcing version imported from gRPC
"org.fusesource.leveldbjni" % "leveldbjni-all" % leveldbVersion,
"ch.qos.logback" % "logback-classic" % "1.2.3"
) ++ Seq(
"com.typesafe.akka" %% "akka-actor-testkit-typed" % akkaVersion,
"org.scalatest" %% "scalatest" % scalatestVersion,
).map(_ % "test")
)
.dependsOn(protobufApi)
lazy val client = (project in file("client"))
.enablePlugins(AkkaGrpcPlugin, JavaAppPackaging)
.settings(
PB.protoSources in Compile += (resourceDirectory in(protobufApi, Compile)).value,
akkaGrpcGeneratedSources := Seq(AkkaGrpc.Client)
)
.settings(
commonSettings,
mainClass in (Compile, packageBin) := Some(
"example.client.Main"
),
libraryDependencies ++= Seq(
"com.github.scopt" %% "scopt" % scoptVersion,
"ch.qos.logback" % "logback-classic" % logbackVersion
)
)
.dependsOn(protobufApi)