forked from juliendangers/chat-grpc-poc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
86 lines (78 loc) · 1.74 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
73
74
75
76
77
78
79
80
81
82
83
84
85
import Dependencies._
lazy val root = project.in(file("."))
lazy val `chat-grpc-server` = project
.dependsOn(domain)
.settings(commonSettings)
.settings(
name := "chat-grpc-server",
version := "0.1.0-SNAPSHOT",
libraryDependencies ++= Seq(
log4jApi,
log4jCore,
log4jSlf4jImpl,
typesafeConfig,
scalaTest % Test
)
)
lazy val `chat-grpc-client` = project
.dependsOn(domain)
.settings(commonSettings)
.settings(
name := "chat-grpc-client",
version := "0.1.0-SNAPSHOT",
libraryDependencies ++= Seq(
log4jApi,
log4jCore,
log4jSlf4jImpl,
typesafeConfig,
scalaFX
)
)
lazy val `web-grpc-client` = project
.dependsOn(domain)
.settings(commonSettings)
.settings(
name := "web-grpc-client",
version := "0.1.0-SNAPSHOT",
libraryDependencies ++= Seq(
log4jApi,
log4jCore,
log4jSlf4jImpl,
typesafeConfig,
akkaHttp
)
)
lazy val domain = project
.settings(pbSettings)
.settings(commonSettings)
.settings(
name := "domain",
version := "0.0.1"
)
lazy val pbSettings =
Seq(
PB.protoSources.in(Compile) := Seq(sourceDirectory.in(Compile).value / "proto"),
PB.targets.in(Compile) := Seq(scalapb.gen() -> sourceManaged.in(Compile).value),
libraryDependencies ++= Seq(
scalaPBRuntime,
scalaPBGRPC,
grpcNetty
)
)
lazy val commonSettings =
Seq(
scalaVersion := "2.12.1",
organization := "com.juliencrestin",
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-language:_",
"-target:jvm-1.8",
"-encoding", "UTF-8",
"-Ywarn-unused-import"
),
javacOptions ++= Seq(
"-source", "1.8",
"-target", "1.8"
)
)