-
-
Notifications
You must be signed in to change notification settings - Fork 19
/
build.sbt
156 lines (145 loc) · 3.56 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
import Dependencies.*
import org.typelevel.scalacoptions.ScalacOptions
inThisBuild(
Seq(
scalaVersion := "3.5.0",
versionScheme := Some("early-semver"),
organization := "org.lichess.search",
run / fork := true,
run / javaOptions += "-Dconfig.override_with_env_vars=true",
semanticdbEnabled := true, // for scalafix
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
)
)
lazy val core = project
.in(file("modules/core"))
.settings(
name := "core",
commonSettings,
libraryDependencies ++= Seq(
catsCore
)
)
lazy val elastic = project
.in(file("modules/elastic"))
.settings(
name := "elastic",
commonSettings,
publish := {},
publish / skip := true,
libraryDependencies ++= Seq(
catsCore,
catsEffect,
elastic4sJavaClient,
elastic4sCatsEffect
)
)
.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"))
.settings(
name := "ingestor",
commonSettings,
publish := {},
publish / skip := true,
resolvers += lilaMaven,
libraryDependencies ++= Seq(
chess,
catsCore,
fs2,
fs2IO,
catsEffect,
declineCore,
declineCatsEffect,
ducktape,
cirisCore,
smithy4sJson,
jsoniterCore,
jsoniterMacro,
circe,
mongo4catsCore,
mongo4catsCirce,
log4Cats,
logback,
weaver,
weaverScalaCheck,
testContainers
),
Compile / run / fork := true
)
.enablePlugins(JavaAppPackaging)
.dependsOn(elastic, api)
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,
weaver,
testContainers
),
Compile / run / fork := true
)
.enablePlugins(JavaAppPackaging)
.dependsOn(api, elastic)
val e2e = (project in file("modules/e2e"))
.settings(
publish := {},
publish / skip := true,
libraryDependencies ++= Seq(weaver)
)
.dependsOn(client, app)
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")