-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
130 lines (119 loc) · 3.33 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
import Dependencies.*
import org.typelevel.scalacoptions.ScalacOptions
inThisBuild(
Seq(
scalaVersion := "3.5.2",
organization := "se.thanh",
organizationName := "Thanh Le",
licenses += ("agpl-v3" -> url("https://opensource.org/license/agpl-v3")),
semanticdbEnabled := true, // for scalafix
Compile / packageDoc / publishArtifact := false,
dockerBaseImage := "openjdk:21",
dockerUpdateLatest := true
)
)
val commonSettings = Seq(
tpolecatScalacOptions ++= Set(
ScalacOptions.sourceFuture,
ScalacOptions.other("-rewrite"),
ScalacOptions.other("-indent"),
ScalacOptions.explain,
ScalacOptions.release("21"),
ScalacOptions.other("-Wsafe-init")
),
libraryDependencies ++= Seq(
catsCore,
catsEffect,
fs2,
log4Cats,
weaver,
weaverScalaCheck
)
)
lazy val types = (project in file("modules/types"))
.settings(
name := "types",
libraryDependencies ++= Seq(
catsCore,
iron
)
)
lazy val api = (project in file("modules/api"))
.enablePlugins(Smithy4sCodegenPlugin)
.settings(
name := "api",
smithy4sWildcardArgument := "?",
libraryDependencies ++= Seq(
"com.disneystreaming.smithy4s" %% "smithy4s-core" % smithy4sVersion.value
)
)
.dependsOn(types)
lazy val domain = (project in file("modules/domain"))
.settings(
name := "domain",
commonSettings
)
.dependsOn(types)
lazy val db = (project in file("modules/db"))
.settings(
commonSettings,
name := "db",
libraryDependencies ++= Seq(
skunk,
postgres,
flyway,
flywayPostgres,
flyway4s,
ducktape,
testContainers
)
)
.dependsOn(domain)
lazy val crawler = (project in file("modules/crawler"))
.settings(
commonSettings,
name := "crawler",
libraryDependencies ++= Seq(
fs2Compress,
http4sClient
)
)
.dependsOn(domain, db)
lazy val backend = (project in file("modules/backend"))
.settings(
commonSettings,
name := "backend",
libraryDependencies ++= Seq(
"com.disneystreaming.smithy4s" %% "smithy4s-http4s" % smithy4sVersion.value,
"com.disneystreaming.smithy4s" %% "smithy4s-http4s-swagger" % smithy4sVersion.value,
http4sServer,
http4sEmberClient,
cirisCore,
cirisHtt4s,
logback
),
Compile / run / fork := true,
Compile / run / connectInput := true,
Docker / packageName := "lenguyenthanh/fide",
Docker / maintainer := "Thanh Le",
Docker / dockerRepository := Some("ghcr.io")
)
.enablePlugins(JavaAppPackaging, DockerPlugin)
.dependsOn(api, domain, db, crawler)
lazy val gatling = (project in file("modules/gatling"))
.settings(name := "gatling")
.enablePlugins(GatlingPlugin)
.settings(
scalacOptions -= "-Xfatal-warnings",
libraryDependencies ++= Seq(
gatlingTestFramework,
gatlingHighCharts,
logback
)
)
lazy val root = project
.in(file("."))
.settings(publish := {}, publish / skip := true)
.aggregate(types, api, domain, db, crawler, backend, gatling)
addCommandAlias("lint", "scalafixAll; scalafmtAll")
addCommandAlias("lintCheck", "; scalafixAll --check ; scalafmtCheckAll")