forked from lichess-org/lila
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBuild.scala
267 lines (213 loc) · 8.96 KB
/
Build.scala
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
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
import play._
import play.Play.autoImport._
import play.twirl.sbt.Import._
import PlayKeys._
import sbt._, Keys._
object ApplicationBuild extends Build {
import BuildSettings._
import Dependencies._
lazy val root = Project("lila", file(".")) enablePlugins PlayScala settings (
scalaVersion := globalScalaVersion,
resolvers ++= Dependencies.Resolvers.commons,
scalacOptions := compilerOptions,
offline := true,
libraryDependencies ++= Seq(
scalaz, scalalib, hasher, config, apache,
jgit, elastic4s, findbugs, RM, PRM,
spray.caching, maxmind, prismic),
scalacOptions := compilerOptions,
incOptions := incOptions.value.withNameHashing(true),
// updateOptions := updateOptions.value.withCachedResolution(true),
sources in doc in Compile := List(),
TwirlKeys.templateImports ++= Seq(
"lila.game.{ Game, Player, Pov }",
"lila.user.{ User, UserContext }",
"lila.security.Permission",
"lila.app.templating.Environment._",
"lila.api.Context",
"lila.common.paginator.Paginator"),
watchSources := (watchSources.value
--- baseDirectory.value / "public" ** "*"
).get
) dependsOn api aggregate api
lazy val modules = Seq(
chess, common, db, rating, user, security, wiki, hub, socket,
message, notification, i18n, game, bookmark, search,
gameSearch, timeline, forum, forumSearch, team, teamSearch,
ai, analyse, mod, monitor, site, round, lobby, setup,
importer, tournament, relation, report, pref, // simulation,
evaluation, chat, puzzle, tv, coordinate, blog, donation, qa,
swisssystem, history, worldMap, opening)
lazy val moduleRefs = modules map projectToRef
lazy val moduleCPDeps = moduleRefs map { new sbt.ClasspathDependency(_, None) }
lazy val api = project("api", moduleCPDeps)
.settings(
libraryDependencies ++= provided(
play.api, hasher, config, apache, jgit,
elastic4s, findbugs, RM)
) aggregate (moduleRefs: _*)
lazy val puzzle = project("puzzle", Seq(
common, memo, hub, db, user, rating)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val opening = project("opening", Seq(
common, memo, hub, db, user)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val coordinate = project("coordinate", Seq(common, db)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val worldMap = project("worldMap", Seq(common, hub, memo)).settings(
libraryDependencies ++= provided(play.api, maxmind)
)
lazy val qa = project("qa", Seq(common, db, memo, user, security)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val blog = project("blog", Seq(common, memo, user, message)).settings(
libraryDependencies ++= provided(play.api, RM, PRM, prismic)
)
lazy val donation = project("donation", Seq(
common, db, user)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val evaluation = project("evaluation", Seq(
common, hub, db, user, game)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val simulation = project("simulation", Seq(
common, hub, socket, game, tv, round, setup)).settings(
libraryDependencies ++= provided(play.api, RM)
)
lazy val common = project("common").settings(
libraryDependencies ++= provided(play.api, play.test, RM)
)
lazy val rating = project("rating", Seq(common, db, chess)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val history = project("history", Seq(common, db, memo, game, user)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val db = project("db", Seq(common)).settings(
libraryDependencies ++= provided(play.test, play.api, RM, PRM)
)
lazy val memo = project("memo", Seq(common, db)).settings(
libraryDependencies ++= Seq(guava, findbugs, spray.caching) ++ provided(play.api, RM)
)
lazy val search = project("search", Seq(common, hub)).settings(
libraryDependencies ++= provided(play.api, elastic4s)
)
lazy val chat = project("chat", Seq(
common, db, user, security, i18n)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val timeline = project("timeline", Seq(common, db, game, user, hub, security, relation)).settings(
libraryDependencies ++= provided(
play.api, play.test, RM, PRM)
)
lazy val mod = project("mod", Seq(common, db, user, hub, security)).settings(
libraryDependencies ++= provided(
play.api, play.test, RM, PRM)
)
lazy val user = project("user", Seq(common, memo, db, hub, chess, rating)).settings(
libraryDependencies ++= provided(
play.api, play.test, RM, PRM, hasher)
)
lazy val game = project("game", Seq(common, memo, db, hub, user, chess, chat)).settings(
libraryDependencies ++= provided(
play.api, RM, PRM)
)
lazy val gameSearch = project("gameSearch", Seq(common, hub, chess, search, game)).settings(
libraryDependencies ++= provided(
play.api, RM, PRM, elastic4s)
)
lazy val tv = project("tv", Seq(common, db, hub, socket, game, user, chess)).settings(
libraryDependencies ++= provided(play.api, RM, PRM, hasher)
)
lazy val analyse = project("analyse", Seq(common, hub, chess, game, user)).settings(
libraryDependencies ++= provided(
play.api, RM, PRM, spray.caching)
)
lazy val round = project("round", Seq(
common, db, memo, hub, socket, chess, game, user, i18n, ai, pref, chat, history)).settings(
libraryDependencies ++= provided(play.api, RM, PRM, hasher)
)
lazy val lobby = project("lobby", Seq(
common, db, memo, hub, socket, chess, game, user, round, timeline, relation)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val setup = project("setup", Seq(
common, db, memo, hub, socket, chess, game, tournament, user, lobby)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val importer = project("importer", Seq(common, chess, game, round)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val tournament = project("tournament", Seq(
common, hub, socket, chess, game, round, security, chat, memo, swisssystem)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val ai = project("ai", Seq(common, hub, chess, game, analyse, rating)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val security = project("security", Seq(common, hub, db, user)).settings(
libraryDependencies ++= provided(play.api, RM, PRM, maxmind, hasher)
)
lazy val relation = project("relation", Seq(common, db, memo, hub, user, game, pref)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val pref = project("pref", Seq(common, db, user)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val message = project("message", Seq(common, db, user, hub, relation, security)).settings(
libraryDependencies ++= provided(
play.api, RM, PRM, spray.caching)
)
lazy val forum = project("forum", Seq(common, db, user, security, hub, mod)).settings(
libraryDependencies ++= provided(
play.api, RM, PRM, spray.caching)
)
lazy val forumSearch = project("forumSearch", Seq(common, hub, forum, search)).settings(
libraryDependencies ++= provided(
play.api, RM, PRM, elastic4s)
)
lazy val team = project("team", Seq(common, memo, db, user, forum, security, hub)).settings(
libraryDependencies ++= provided(
play.api, RM, PRM)
)
lazy val teamSearch = project("teamSearch", Seq(common, hub, team, search)).settings(
libraryDependencies ++= provided(
play.api, RM, PRM, elastic4s)
)
lazy val i18n = project("i18n", Seq(common, db, user, hub)).settings(
libraryDependencies ++= provided(play.api, RM, PRM, jgit)
)
lazy val bookmark = project("bookmark", Seq(common, memo, db, hub, user, game)).settings(
libraryDependencies ++= provided(
play.api, play.test, RM, PRM)
)
lazy val wiki = project("wiki", Seq(common, db)).settings(
libraryDependencies ++= provided(
play.api, RM, PRM, jgit, guava)
)
lazy val report = project("report", Seq(common, db, user)).settings(
libraryDependencies ++= provided(
play.api, RM, PRM)
)
lazy val notification = project("notification", Seq(common, user, hub)).settings(
libraryDependencies ++= provided(play.api)
)
lazy val monitor = project("monitor", Seq(common, hub, socket, db)).settings(
libraryDependencies ++= provided(play.api, RM, PRM)
)
lazy val site = project("site", Seq(common, socket)).settings(
libraryDependencies ++= provided(play.api)
)
lazy val socket = project("socket", Seq(common, hub, memo)).settings(
libraryDependencies ++= provided(play.api)
)
lazy val hub = project("hub", Seq(common)).settings(
libraryDependencies ++= provided(play.api)
)
lazy val chess = project("chess")
lazy val swisssystem = project("swisssystem")
}