-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
113 lines (105 loc) · 2.83 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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
import Dependencies._
import sbt.{Attributed, ThisBuild}
ThisBuild / scalaVersion := "2.13.8"
ThisBuild / version := "0.1.0-SNAPSHOT"
ThisBuild / organization := "markosski"
ThisBuild / organizationName := "eventdriven"
ThisBuild / assemblyMergeStrategy := {
case PathList("javax", "servlet", xs @ _*) => MergeStrategy.first
case PathList(ps @ _*) if ps.last endsWith ".html" => MergeStrategy.first
case PathList(ps @ _*) if ps.last endsWith "module-info.class" =>
MergeStrategy.discard
case PathList(ps @ _*) if ps.last endsWith "reference-overrides.conf" =>
MergeStrategy.concat
case "application.conf" => MergeStrategy.concat
case x =>
val oldStrategy = (ThisBuild / assemblyMergeStrategy).value
oldStrategy(x)
}
lazy val commonSettings = List(
scalacOptions ++= Seq(
"-encoding",
"utf8",
"-deprecation",
"-unchecked",
"-Xlint",
"-Xfatal-warnings"
)
)
lazy val webapp = (project in file("webapp"))
.settings(
name := "webapp",
assembly / mainClass := Some("play.core.server.ProdServerStart"),
assembly / fullClasspath += Attributed.blank(
PlayKeys.playPackageAssets.value
),
libraryDependencies ++= Seq(
`jackson-module-scala`,
`jackson-core`,
`jackson-databind`,
`airframe-log`,
`sttp`,
munit,
pureconfig,
guice
)
)
.dependsOn(core)
.enablePlugins(PlayScala)
lazy val core = (project in file("core"))
.settings(
testFrameworks += new TestFramework("munit.Framework"),
name := "core",
assembly / mainClass := Some("eventdriven.core.App"),
libraryDependencies ++= Seq(
`kafka-clients`,
`jackson-module-scala`,
`jackson-core`,
`jackson-databind`,
`logback-classic`,
`slf4j`,
munit,
pureconfig
)
)
lazy val payments = (project in file("payments"))
.settings(
testFrameworks += new TestFramework("munit.Framework"),
name := "payments",
libraryDependencies ++= Seq(
`airframe-log`,
`sttp`,
munit
) ++ akka
)
.dependsOn(core)
lazy val accounts = (project in file("accounts"))
.settings(
testFrameworks += new TestFramework("munit.Framework"),
name := "accounts",
libraryDependencies ++= Seq(
`airframe-log`,
munit
) ++ akka
)
.dependsOn(core)
lazy val transactions = (project in file("transactions"))
.settings(
testFrameworks += new TestFramework("munit.Framework"),
Compile / run / mainClass := Some(
"eventdriven.transactions.web.TransactionsApp"
),
name := "transactions",
libraryDependencies ++= Seq(
`airframe-log`,
munit
) ++ akka
)
.dependsOn(core)
.enablePlugins(JettyPlugin)
lazy val root = (project in file("."))
.settings(
commonSettings,
scalafmtOnCompile := true
)
.aggregate(core, transactions, accounts, payments, webapp)