-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
161 lines (150 loc) · 5.41 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
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
val zioVersion = "2.1.14"
val zioJsonVersion = "0.7.3"
val zioLoggingVersion = "2.4.0"
val testcontainersVersion = "0.41.5"
ThisBuild / scalaVersion := "3.6.2"
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
ThisBuild / assembly / assemblyMergeStrategy := {
case "module-info.class" => MergeStrategy.first
case "META-INF/io.netty.versions.properties" => MergeStrategy.first
case "META-INF/versions/9/module-info.class" => MergeStrategy.first
case "META-INF/okio.kotlin_module" => MergeStrategy.first
case "logback.xml" => MergeStrategy.first
case x =>
val oldStrategy = (assembly / assemblyMergeStrategy).value
oldStrategy(x)
}
lazy val domain =
project
.in(file("modules/1-domain"))
lazy val effects =
project
.in(file("modules/2-effects"))
.dependsOn(domain)
.settings(
libraryDependencies += "org.scalameta" %% "munit" % "1.0.3" % Test
)
lazy val use_cases =
project
.in(file("modules/3-use-cases"))
.enablePlugins(BuildInfoPlugin)
.settings(
buildInfoKeys := Seq[BuildInfoKey](version),
buildInfoPackage := "sectery.usecases",
libraryDependencies += "org.jsoup" % "jsoup" % "1.18.3",
libraryDependencies += "org.ocpsoft.prettytime" % "prettytime" % "5.0.9.Final",
libraryDependencies += "net.objecthunter" % "exp4j" % "0.4.8",
libraryDependencies += "org.scalameta" %% "munit" % "1.0.3" % Test,
libraryDependencies += "org.scalameta" %% "munit-scalacheck" % "1.0.0" % Test
)
.dependsOn(domain, effects)
lazy val adaptors =
project
.in(file("modules/4-adaptors"))
.enablePlugins(BuildInfoPlugin)
.settings(
buildInfoKeys := Seq[BuildInfoKey](version),
buildInfoPackage := "sectery.adaptors",
libraryDependencies += "dev.zio" %% "zio-json" % zioJsonVersion exclude (
"dev.zio",
"zio"
),
libraryDependencies += "com.h2database" % "h2" % "2.3.232" % Test,
libraryDependencies += "org.scalameta" %% "munit" % "1.0.3" % Test
)
.dependsOn(effects)
lazy val adaptors_with_zio =
project
.in(file("modules/4-adaptors-with-zio"))
.settings(
libraryDependencies += "com.rabbitmq" % "amqp-client" % "5.24.0",
libraryDependencies += "dev.zio" %% "zio" % zioVersion,
libraryDependencies += "dev.zio" %% "zio-json" % zioJsonVersion exclude (
"dev.zio",
"zio"
)
)
.dependsOn(domain, effects, use_cases)
lazy val producers =
project
.in(file("modules/5-producers"))
.settings(
moduleName := "producers",
libraryDependencies += "org.mariadb.jdbc" % "mariadb-java-client" % "3.5.1",
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.5.15",
libraryDependencies += "dev.zio" %% "zio-logging" % zioLoggingVersion exclude (
"dev.zio",
"zio"
),
libraryDependencies += "dev.zio" %% "zio-logging-slf4j2" % zioLoggingVersion exclude (
"dev.zio",
"zio"
),
assembly / mainClass := Some("sectery.producers.Main"),
assembly / assemblyJarName := s"${name.value}.jar",
Compile / run / fork := true
)
.dependsOn(adaptors_with_zio, use_cases, adaptors)
lazy val irc =
project
.in(file("modules/5-irc"))
.settings(
moduleName := "irc",
resolvers += "jitpack" at "https://jitpack.io/", // needed for pircbotx
libraryDependencies += "com.github.pircbotx" % "pircbotx" % "2.3.1",
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.5.15",
libraryDependencies += "dev.zio" %% "zio-logging" % zioLoggingVersion exclude (
"dev.zio",
"zio"
),
libraryDependencies += "dev.zio" %% "zio-logging-slf4j2" % zioLoggingVersion exclude (
"dev.zio",
"zio"
),
assembly / mainClass := Some("sectery.irc.Main"),
assembly / assemblyJarName := s"${name.value}.jar",
Compile / run / fork := true
)
.dependsOn(adaptors_with_zio, use_cases, adaptors)
lazy val slack =
project
.in(file("modules/5-slack"))
.settings(
moduleName := "slack",
libraryDependencies += "com.slack.api" % "bolt-socket-mode" % "1.44.2",
libraryDependencies += "javax.websocket" % "javax.websocket-api" % "1.1" % Provided,
libraryDependencies += "org.glassfish.tyrus.bundles" % "tyrus-standalone-client" % "2.2.0",
libraryDependencies += "ch.qos.logback" % "logback-classic" % "1.5.15",
libraryDependencies += "dev.zio" %% "zio-logging" % zioLoggingVersion exclude (
"dev.zio",
"zio"
),
libraryDependencies += "dev.zio" %% "zio-logging-slf4j2" % zioLoggingVersion exclude (
"dev.zio",
"zio"
),
assembly / mainClass := Some("sectery.slack.Main"),
assembly / assemblyJarName := s"${name.value}.jar",
Compile / run / fork := true
)
.dependsOn(adaptors_with_zio, use_cases, adaptors)
lazy val root =
project
.in(file("."))
.settings(
libraryDependencies += "com.dimafeng" %% "testcontainers-scala-rabbitmq" % testcontainersVersion % Test,
libraryDependencies += "com.dimafeng" %% "testcontainers-scala-mariadb" % testcontainersVersion % Test,
Test / run / fork := true
)
.dependsOn(producers, irc, slack)
.aggregate(
producers,
irc,
slack,
adaptors_with_zio,
adaptors,
use_cases,
effects,
domain
)