-
-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathbuild.sbt
175 lines (164 loc) · 3.97 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
162
163
164
165
166
167
168
169
170
171
172
173
174
175
import Dependencies.*
import org.typelevel.scalacoptions.ScalacOptions
inThisBuild(
Seq(
scalaVersion := "3.6.2",
versionScheme := Some("early-semver"),
organization := "org.lichess.search",
run / fork := true,
run / javaOptions += "-Dconfig.override_with_env_vars=true",
semanticdbEnabled := true, // for scalafix
resolvers ++= ourResolvers,
Compile / doc / sources := Seq.empty,
publishTo := Option(Resolver.file("file", new File(sys.props.getOrElse("publishTo", ""))))
)
)
val commonSettings = Seq(
tpolecatScalacOptions ++= Set(
ScalacOptions.sourceFuture,
ScalacOptions.other("-rewrite"),
ScalacOptions.other("-indent"),
ScalacOptions.explain,
ScalacOptions.release("21"),
ScalacOptions.other("-Wsafe-init") // fix in: https://github.com/typelevel/scalac-options/pull/136
),
libraryDependencies += compilerPlugin("com.github.ghik" % "zerowaste" % "0.2.28" cross CrossVersion.full)
)
lazy val core = project
.in(file("modules/core"))
.enablePlugins(Smithy4sCodegenPlugin)
.settings(
name := "core",
commonSettings,
libraryDependencies ++= Seq(
catsCore,
smithy4sCore
)
)
lazy val elastic = project
.in(file("modules/elastic"))
.settings(
name := "elastic",
commonSettings,
publish := {},
publish / skip := true,
libraryDependencies ++= Seq(
catsCore,
catsEffect,
http4sClient,
elastic4sCatsEffect,
elastic4sHttp4sClient,
otel4sCore
)
)
.dependsOn(core)
lazy val api = project
.in(file("modules/api"))
.enablePlugins(Smithy4sCodegenPlugin)
.settings(
name := "api",
commonSettings,
smithy4sWildcardArgument := "?",
libraryDependencies ++= Seq(
catsCore,
smithy4sCore
)
)
.dependsOn(core)
lazy val ingestor = project
.in(file("modules/ingestor"))
.enablePlugins(Smithy4sCodegenPlugin)
.settings(
name := "ingestor",
commonSettings,
publish := {},
publish / skip := true,
libraryDependencies ++= Seq(
chess,
catsCore,
fs2,
fs2IO,
catsEffect,
declineCore,
declineCatsEffect,
ducktape,
cirisCore,
cirisHtt4s,
smithy4sCore,
smithy4sJson,
jsoniterCore,
jsoniterMacro,
circe,
http4sServer,
http4sEmberClient,
mongo4catsCore,
mongo4catsCirce,
log4Cats,
logback,
otel4sMetricts,
otel4sSdk,
otel4sPrometheusExporter,
weaver,
weaverScalaCheck,
testContainers
),
Compile / run / fork := true
)
.enablePlugins(JavaAppPackaging)
.dependsOn(elastic, core)
lazy val client = project
.in(file("modules/client"))
.settings(
name := "client",
commonSettings,
libraryDependencies ++= Seq(
smithy4sJson,
jsoniterCore,
jsoniterMacro,
playWS
)
)
.dependsOn(api, core)
lazy val app = project
.in(file("modules/app"))
.settings(
name := "lila-search",
commonSettings,
publish := {},
publish / skip := true,
libraryDependencies ++= Seq(
smithy4sHttp4s,
jsoniterCore,
jsoniterMacro,
smithy4sHttp4sSwagger,
catsCore,
catsEffect,
ducktape,
http4sServer,
http4sEmberClient,
cirisCore,
cirisHtt4s,
log4Cats,
logback,
otel4sMetricts,
otel4sSdk,
otel4sPrometheusExporter
),
Compile / run / fork := true
)
.enablePlugins(JavaAppPackaging)
.dependsOn(api, elastic)
val e2e = project
.in(file("modules/e2e"))
.settings(
publish := {},
publish / skip := true,
libraryDependencies ++= Seq(testContainers, weaver)
)
.dependsOn(client, app, ingestor)
lazy val root = project
.in(file("."))
.settings(publish := {}, publish / skip := true)
.aggregate(core, api, app, client, e2e, elastic, ingestor)
addCommandAlias("prepare", "scalafixAll; scalafmtAll")
addCommandAlias("check", "; scalafixAll --check ; scalafmtCheckAll")