-
Notifications
You must be signed in to change notification settings - Fork 15
/
build.sbt
67 lines (55 loc) · 1.88 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
import scala.sys.process._
lazy val root = (project in file("."))
.enablePlugins(PlayScala)
name := "erqx-engine"
organization := "au.id.jazzy.erqx"
LessKeys.compress := true
bintrayRepository := "maven"
bintrayPackage := "erqx"
releaseCrossBuild := true
licenses += ("Apache-2.0", url("http://www.apache.org/licenses/LICENSE-2.0"))
scalaVersion := "2.13.8"
crossScalaVersions := Seq("2.12.16", "2.13.8")
// Production dependencies
libraryDependencies ++= Seq(
"com.typesafe.play" %% "play-doc" % "2.1.0",
"org.eclipse.jgit" % "org.eclipse.jgit" % "5.1.3.201810200350-r",
"org.yaml" % "snakeyaml" % "1.23"
)
// Web dependencies
libraryDependencies ++= Seq(
"org.webjars" % "bootstrap" % "3.2.0",
"org.webjars" % "prettify" % "4-Mar-2013",
"org.webjars" % "retinajs" % "0.0.2"
)
// Test dependencies
libraryDependencies ++= Seq(
"radeox" % "radeox" % "1.0-b2" % "test",
specs2
)
// Version file
Compile / sourceGenerators += Def.task {
val dir = (Compile / sourceManaged).value
val hash = "git rev-parse HEAD".!!.trim
val file = dir / "au" / "id" / "jazzy" / "erqx" / "engine" / "ErqxBuild.scala"
if (!file.exists || !IO.read(file).contains(hash)) {
IO.write(file,
""" |package au.id.jazzy.erqx.engine
|
|object ErqxBuild {
| val hash = "%s"
| val version = "%s"
|}
""".stripMargin.format(hash, version.value))
}
Seq(file)
}.taskValue
lazy val minimal = project.in(file("samples/minimal"))
.enablePlugins(PlayScala)
.dependsOn(root).aggregate(root)
// Concatinate erqx theme assets
Concat.groups := Seq(
"erqx-jazzy-theme.css" -> group(Seq("lib/bootstrap/css/bootstrap.min.css", "main.min.css", "lib/prettify/prettify.css")),
"erqx-jazzy-theme.js" -> group(Seq("lib/jquery/jquery.min.js", "lib/prettify/prettify.js", "lib/prettify/lang-scala.js", "lib/retinajs/retina.js"))
)
Assets / pipelineStages := Seq(concat)