-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathbuild.sbt
174 lines (151 loc) · 5.72 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
import LiftModuleKeys.{liftEdition, liftVersion}
//##################################################################
//##
//## Build settings
//##
//##############
lazy val commonSettings = Seq(
organization := "net.liftweb",
version := "2.1.1-SNAPSHOT",
scalacOptions ++= Seq("-unchecked", "-deprecation"),
autoAPIMappings := true
)
lazy val buildInfo = Seq(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, sbtVersion),
buildInfoKeys ++= Seq[BuildInfoKey](
BuildInfoKey.action("buildTime") {
System.currentTimeMillis
} // re-computed each time at compile
),
buildInfoPackage := "code.lib"
)
lazy val fobometa = (project in file("."))
.settings(commonSettings: _*)
// .enablePlugins(ScalaUnidocPlugin)
.settings(name := "FoBo-Demo")
.settings(scalaVersion in ThisBuild := "2.12.7")
.settings(
liftVersion in ThisBuild := { liftVersion ?? "3.3.0" }.value)
.settings(liftEdition in ThisBuild := {
liftVersion apply { _.substring(0, 3) }
}.value)
.aggregate(
foboLiftTemplateDemo,
foboLiftRoundTrips,
bs3StarterTemplates,
bs4StarterTemplates,
mdStarterTemplates
)
lazy val foboLiftTemplateDemo = (project in file("fobo-lift-template-demo"))
.enablePlugins(JettyPlugin)
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(buildInfo: _*)
.settings(name := "fobo-lift-template-demo")
lazy val foboLiftRoundTrips = (project in file("fobo-angular-lift-roundtrips"))
.enablePlugins(JettyPlugin)
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(buildInfo: _*)
.settings(name := "fobo-angular-lift-roundtrips")
lazy val bs3StarterTemplates = (project in file("pimping-lift-advanced-bs3"))
.enablePlugins(JettyPlugin)
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(buildInfo: _*)
.settings(name := "pimping-lift-advanced-bs3")
lazy val bs4StarterTemplates = (project in file("pimping-lift-advanced-bs4"))
.enablePlugins(JettyPlugin)
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(buildInfo: _*)
.settings(name := "pimping-lift-advanced-bs4")
lazy val mdStarterTemplates = (project in file("pimping-lift-advanced-md"))
.enablePlugins(JettyPlugin)
.enablePlugins(BuildInfoPlugin)
.settings(commonSettings: _*)
.settings(buildInfo: _*)
.settings(name := "pimping-lift-advanced-md")
//##
//##
//##################################################################
//##################################################################
//##
//## 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 plugins
//##
//##############
// enablePlugins(JettyPlugin)
//##
//##
//##################################################################
//##################################################################
//##
//## Common dependencies
//##
//##############
libraryDependencies in ThisBuild ++= {
"net.liftweb" %% "lift-webkit" % liftVersion.value % "compile" ::
"net.liftweb" %% "lift-mapper" % liftVersion.value % "compile" ::
"net.liftmodules" %% ("fobo" + "_" + liftEdition.value) % "2.1.1" % "compile" ::
"net.liftweb" %% "lift-testkit" % liftVersion.value % "test" ::
Nil
}
//to be able to debug (inside eclipse) we need to move stuff to the top level src folders and currently
//we are debugging the bs3 sand-box stuff that the only reason we need this extra stuff here right now.
libraryDependencies in ThisBuild ++= Seq(
"org.eclipse.jetty" % "jetty-webapp" % "8.1.7.v20120910" % "test",
"org.eclipse.jetty.orbit" % "javax.servlet" % "3.0.0.v201112011016" % "test" artifacts Artifact(
"javax.servlet",
"jar",
"jar")
)
libraryDependencies ++= {
((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") | (_, "3.0.2") => "org.specs2" %% "specs2-core" % "3.8.6" % "test"
case (_, _) =>
"org.specs2" %% "specs2-core" % "3.8.6" % "test" //lift 3.1.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") | (_, "3.0.2") =>
"org.specs2" %% "specs2-matcher-extra" % "3.8.6" % "test"
case (_, _) =>
"org.specs2" %% "specs2-matcher-extra" % "3.8.6" % "test" //lift 3.1.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") | (_, "3.0.2") =>
"org.specs2" %% "specs2-scalacheck" % "3.8.6" % "test"
case (_, _) =>
"org.specs2" %% "specs2-scalacheck" % "3.8.6" % "test" //lift 3.1.x
}) ::
Nil
}
//##
//##
//##################################################################