-
-
Notifications
You must be signed in to change notification settings - Fork 65
/
Copy pathbuild.sbt
53 lines (44 loc) · 1.53 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
name := "playframework"
version := "1.0-SNAPSHOT"
enablePlugins(PlayScala)
scalaVersion := "3.3.4"
scalacOptions ++= List("-encoding", "utf8", "-deprecation", "-feature", "-unchecked")
libraryDependencies ++= Seq(
"org.playframework" %% "play-doc" % "3.0.1",
"org.eclipse.jgit" % "org.eclipse.jgit" % "7.0.0.202409031743-r",
"com.damnhandy" % "handy-uri-templates" % "2.1.8",
"org.webjars" % "jquery" % "3.7.1",
"org.webjars" % "html5shiv" % "3.7.3-1",
"org.webjars" % "prettify" % "4-Mar-2013-1",
"org.webjars" % "clipboard.js" % "2.0.11",
guice,
ehcache,
filters,
ws,
specs2 % Test,
)
routesGenerator := InjectedRoutesGenerator
JsEngineKeys.engineType := JsEngineKeys.EngineType.Node
Assets / StylusKeys.useNib := true
Assets / StylusKeys.compress := true
pipelineStages := Seq(digest, gzip)
Compile / sourceGenerators += Def.task {
import scala.sys.process._
val siteVersionFile = crossTarget.value / "version" / "SiteVersion.scala"
val gitHash = "git rev-parse HEAD".!!.trim
if (!siteVersionFile.exists || !IO.read(siteVersionFile).contains(gitHash)) {
IO.write(
siteVersionFile,
"""package utils
|
|object SiteVersion {
| val hash = "%s"
|}
""".stripMargin.format(gitHash),
)
}
Seq(siteVersionFile)
}.taskValue
Compile / managedSourceDirectories += crossTarget.value / "version"
Compile / doc / sources := Seq.empty
Compile / packageDoc / publishArtifact := false