-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathbuild.sbt
382 lines (326 loc) · 12.2 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
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
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
import LiftModuleKeys.{liftVersion, liftEdition}
//##################################################################
//##
//## Build settings
//##
//##############
//scalacOptions in Compile ++= Seq("-doc-root-content", "rootdoc.txt")
// onLoad in Global := { s => "dependencyUpdates" :: s }
lazy val commonSettings = Seq(
organization := "net.liftmodules",
version := "2.1.1",
scalacOptions ++= Seq("-unchecked", "-deprecation"),
autoAPIMappings := true
)
lazy val fobometa = (project in file("."))
.settings(commonSettings: _*)
.enablePlugins(ScalaUnidocPlugin)
.settings(name := "fobo-meta")
.settings(scalaVersion in ThisBuild := "2.12.6")
.settings(
liftVersion in ThisBuild := { liftVersion ?? "3.3.0" }.value)
.settings(liftEdition in ThisBuild := {
liftVersion apply { _.substring(0, 3) }
}.value)
.aggregate(fobo)
lazy val fobo = (project in file("FoBo/FoBo"))
.settings(commonSettings: _*)
.settings(name := "fobo")
.aggregate(foboapi,
pace,
angularjs,
jquery,
bootstrap,
bootstrap3,
bootstrap4,
fontAwesome,
prettify,
highlightjs,
popper,
tooltip)
.dependsOn(foboapi,
pace,
angularjs,
jquery,
bootstrap,
bootstrap3,
bootstrap4,
fontAwesome,
prettify,
highlightjs,
popper,
tooltip)
lazy val foboapi = (project in file("FoBo/FoBo-API"))
.enablePlugins(BuildInfoPlugin)
.settings(name := "fobo-api")
.settings(commonSettings: _*)
.settings(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoPackage := "net.liftmodules.fobo.lib"
)
lazy val pace = (project in file("Pace/Pace"))
.settings(commonSettings: _*)
.settings(name := "fobo-pace")
.aggregate(paceapi, paceres)
.dependsOn(paceapi, paceres)
lazy val paceapi = (project in file("Pace/Pace-API"))
.settings(commonSettings: _*)
.settings(name := "fobo-pace-api")
lazy val paceres = (project in file("Pace/Pace-Res"))
.settings(commonSettings: _*)
.settings(name := "fobo-pace-res")
lazy val angularjs = (project in file("Angular/AngularJS"))
.settings(commonSettings: _*)
.settings(name := "fobo-angularjs")
.aggregate(angularjsapi, angularjsres)
.dependsOn(angularjsapi, angularjsres)
lazy val angularjsapi = (project in file("Angular/AngularJS-API"))
.settings(commonSettings: _*)
.settings(name := "fobo-angularjs-api")
lazy val angularjsres = (project in file("Angular/AngularJS-Res"))
.settings(commonSettings: _*)
.settings(name := "fobo-angularjs-res")
lazy val jquery = (project in file("JQuery/JQuery"))
.settings(commonSettings: _*)
.settings(name := "fobo-jquery")
.aggregate(jqueryapi, jqueryres)
.dependsOn(jqueryapi, jqueryres)
lazy val jqueryapi = (project in file("JQuery/JQuery-API"))
.settings(commonSettings: _*)
.settings(name := "fobo-jquery-api")
lazy val jqueryres = (project in file("JQuery/JQuery-Res"))
.settings(commonSettings: _*)
.settings(name := "fobo-jquery-res")
lazy val bootstrap =
(project in file("Bootstrap/Bootstrap2/Twitter-Bootstrap"))
.settings(commonSettings: _*)
.settings(name := "fobo-twitter-bootstrap")
.aggregate(bootstrapapi, bootstrapres)
.dependsOn(bootstrapapi, bootstrapres)
lazy val bootstrapapi =
(project in file("Bootstrap/Bootstrap2/Twitter-Bootstrap-API"))
.settings(commonSettings: _*)
.settings(name := "fobo-twitter-bootstrap-api")
lazy val bootstrapres =
(project in file("Bootstrap/Bootstrap2/Twitter-Bootstrap-Res"))
.settings(commonSettings: _*)
.settings(name := "fobo-twitter-bootstrap-res")
lazy val bootstrap3 = (project in file("Bootstrap/Bootstrap3/TwBs-Bootstrap3"))
.settings(commonSettings: _*)
.settings(name := "fobo-twbs-bootstrap3")
.aggregate(bootstrap3api, bootstrap3res)
.dependsOn(bootstrap3api, bootstrap3res)
lazy val bootstrap3api =
(project in file("Bootstrap/Bootstrap3/TwBs-Bootstrap3-API"))
.settings(commonSettings: _*)
.settings(name := "fobo-twbs-bootstrap3-api")
lazy val bootstrap3res =
(project in file("Bootstrap/Bootstrap3/TwBs-Bootstrap3-Res"))
.settings(commonSettings: _*)
.settings(name := "fobo-twbs-bootstrap3-res")
lazy val bootstrap4 = (project in file("Bootstrap/Bootstrap4/TwBs-Bootstrap4"))
.settings(commonSettings: _*)
.settings(name := "fobo-twbs-bootstrap4")
.aggregate(bootstrap4api, bootstrap4res)
.dependsOn(bootstrap4api, bootstrap4res)
lazy val bootstrap4api =
(project in file("Bootstrap/Bootstrap4/TwBs-Bootstrap4-API"))
.settings(commonSettings: _*)
.settings(name := "fobo-twbs-bootstrap4-api")
lazy val bootstrap4res =
(project in file("Bootstrap/Bootstrap4/TwBs-Bootstrap4-Res"))
.settings(commonSettings: _*)
.settings(name := "fobo-twbs-bootstrap4-res")
lazy val fontAwesome = (project in file("Font-Awesome/Font-Awesome"))
.settings(commonSettings: _*)
.settings(name := "fobo-font-awesome")
.aggregate(fontAwesomeapi, fontAwesomeres)
.dependsOn(fontAwesomeapi, fontAwesomeres)
lazy val fontAwesomeres = (project in file("Font-Awesome/Font-Awesome-Res"))
.settings(commonSettings: _*)
.settings(name := "fobo-font-awesome-res")
lazy val fontAwesomeapi = (project in file("Font-Awesome/Font-Awesome-API"))
.settings(commonSettings: _*)
.settings(name := "fobo-font-awesome-api")
lazy val prettify =
(project in file("Google-Code-Prettify/Google-Code-Prettify"))
.settings(commonSettings: _*)
.settings(name := "fobo-google-code-prettify")
.aggregate(prettifyres)
.dependsOn(prettifyres)
lazy val prettifyres =
(project in file("Google-Code-Prettify/Google-Code-Prettify-Res"))
.settings(commonSettings: _*)
.settings(name := "fobo-google-code-prettify-res")
lazy val highlightjs = (project in file("Highlight/HighlightJS"))
.settings(commonSettings: _*)
.settings(name := "fobo-highlightjs")
.aggregate(highlightjsapi, highlightjsres)
.dependsOn(highlightjsapi, highlightjsres)
lazy val highlightjsapi = (project in file("Highlight/HighlightJS-API"))
.settings(commonSettings: _*)
.settings(name := "fobo-highlightjs-api")
lazy val highlightjsres = (project in file("Highlight/HighlightJS-Res"))
.settings(commonSettings: _*)
.settings(name := "fobo-highlightjs-res")
lazy val popper = (project in file("Popper/Popper"))
.settings(commonSettings: _*)
.settings(name := "fobo-popper")
.aggregate(popperapi, popperres)
.dependsOn(popperapi, popperres)
lazy val popperapi = (project in file("Popper/Popper-API"))
.settings(commonSettings: _*)
.settings(name := "fobo-popper-api")
lazy val popperres = (project in file("Popper/Popper-Res"))
.settings(commonSettings: _*)
.settings(name := "fobo-popper-res")
lazy val tooltip = (project in file("Popper/Tooltip"))
.settings(commonSettings: _*)
.settings(name := "fobo-tooltip")
.aggregate(tooltipapi, tooltipres)
.dependsOn(tooltipapi, tooltipres)
lazy val tooltipapi = (project in file("Popper/Tooltip-API"))
.settings(commonSettings: _*)
.settings(name := "fobo-tooltip-api")
lazy val tooltipres = (project in file("Popper/Tooltip-Res"))
.settings(commonSettings: _*)
.settings(name := "fobo-tooltip-res")
//##
//##
//##################################################################
//##################################################################
//##
//## Common resolvers
//##
//##############
resolvers in ThisBuild ++= Seq(
"snapshots" at "https://oss.sonatype.org/content/repositories/snapshots",
"releases" at "https://oss.sonatype.org/service/local/staging/deploy/maven2"
)
//##
//##
//##################################################################
//##################################################################
//##
//## Common dependencies
//##
//##############
libraryDependencies in ThisBuild ++= {
"net.liftweb" %% "lift-webkit" % liftVersion.value % "provided" ::
"net.liftweb" %% "lift-testkit" % liftVersion.value % "provided" ::
Nil
}
libraryDependencies in ThisBuild ++= {
((scalaVersion.value, liftVersion.value) match {
case ("2.10.4", _) | ("2.9.2", _) | ("2.9.1", _) | ("2.9.1-1", _) =>
"org.specs2" %% "specs2" % "1.12.3" % "test"
case ("2.11.7", "2.6.2") | ("2.11.7", "2.6.3") =>
"org.specs2" %% "specs2" % "2.3.11" % "test"
case (_, "3.0.0") => "org.specs2" %% "specs2" % "3.7" % "test"
case (_, "3.0.1") => "org.specs2" %% "specs2-core" % "3.8.6" % "test"
case (_, "3.1.1") | (_, "3.1.2") =>
"org.specs2" %% "specs2-core" % "3.8.6" % "test" //lift 3.1.x / 3.2.x
case (_, _) =>
"org.specs2" %% "specs2-core" % "4.0.2" % "test" //lift 3.3.x
}) ::
((scalaVersion.value, liftVersion.value) match {
case ("2.10.4", _) | ("2.9.2", _) | ("2.9.1", _) | ("2.9.1-1", _) =>
"org.specs2" %% "specs2" % "1.12.3" % "test"
case ("2.11.7", "2.6.2") | ("2.11.7", "2.6.3") =>
"org.specs2" %% "specs2" % "2.3.11" % "test"
case (_, "3.0.0") =>
"org.specs2" %% "specs2" % "3.7" % "test" //no mather extras for 3.7
case (_, "3.0.1") =>
"org.specs2" %% "specs2-matcher-extra" % "3.8.6" % "test"
case (_, "3.1.1") | (_, "3.1.2") =>
"org.specs2" %% "specs2-matcher-extra" % "3.8.6" % "test" //lift 3.1.x / 3.2.x
case (_, _) =>
"org.specs2" %% "specs2-matcher-extra" % "4.0.2" % "test" //lift 3.3.x
}) ::
((scalaVersion.value, liftVersion.value) match {
case (_, "2.6.2") | (_, "2.6.3") =>
"org.scalacheck" %% "scalacheck" % "1.10.1" % "test"
case (_, "3.0.0") =>
"org.specs2" %% "specs2-scalacheck" % "3.7" % "test"
case (_, "3.0.1") =>
"org.specs2" %% "specs2-scalacheck" % "3.8.6" % "test"
case (_, "3.1.1") | (_, "3.1.2") =>
"org.specs2" %% "specs2-scalacheck" % "3.8.6" % "test" //lift 3.1.x / 3.2.x
case (_, _) =>
"org.specs2" %% "specs2-scalacheck" % "4.0.2" % "test" //lift 3.3.x
}) ::
Nil
}
libraryDependencies in ThisBuild ++= {
(liftVersion.value match {
case "2.6.2" | "2.6.3" =>
"javax.servlet" % "servlet-api" % "2.5" % "provided,test"
case "3.0.2" | "3.1.1" | "3.2.0" => "javax.servlet" % "javax.servlet-api" % "3.1.0" % "provided,test"
case _ => "javax.servlet" % "javax.servlet-api" % "4.0.0" % "provided,test"
}) ::
Nil
}
libraryDependencies in ThisBuild ++= {
"ch.qos.logback" % "logback-classic" % "1.2.3" % "provided" ::
"log4j" % "log4j" % "1.2.17" % "provided" ::
Nil
}
//##
//##
//##################################################################
//##################################################################
//##
//## Eclipse stuff
//##
//##############
//EclipseKeys.withSource in ThisBuild := true
//EclipseKeys.skipParents in ThisBuild := false
//EclipseKeys.createSrc := EclipseCreateSrc.Default + EclipseCreateSrc.Managed
//##
//##
//##################################################################
//##################################################################
//##
//## Publish to Sonatype
//##
//##############
credentials in ThisBuild += Credentials(
file("/private/liftmodules/sonatype.credentials"))
publishTo in ThisBuild := {
version { v: String =>
val sonatype = "https://oss.sonatype.org/"
if (v.trim.endsWith("SNAPSHOT"))
Some("snapshots" at sonatype + "content/repositories/snapshots")
else
Some("releases" at sonatype + "service/local/staging/deploy/maven2")
}
}.value
publishMavenStyle in ThisBuild := true
publishArtifact in Test := false
pomIncludeRepository in ThisBuild := { x =>
false
}
pomExtra in ThisBuild := (
<url>http://www.media4u101.se/fobo-lift-template-demo/</url>
<licenses>
<license>
<name>The Apache Software License, Version 2.0</name>
<url>http://maven.apache.org/ref/2.1.0/maven-profile/license.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>[email protected]:karma4u101/FoBo.git</url>
<connection>scm:git:[email protected]:karma4u101/FoBo.git</connection>
</scm>
<developers>
<developer>
<id>karma4u101</id>
<name>Peter Petersson</name>
<url>http://www.media4u101.se</url>
</developer>
</developers>
)
//##
//##
//##################################################################