-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
61 lines (50 loc) · 2.04 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
import play.sbt.PlayLayoutPlugin
import play.twirl.sbt.SbtTwirl
lazy val commonSettings = Seq(
version := "1.0.0-SNAPSHOT",
organization := "org.combinators",
scalaVersion := "2.12.13",
resolvers ++= Seq(
Resolver.sonatypeRepo("releases"),
Resolver.typesafeRepo("releases")
),
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-feature",
"-language:implicitConversions"
),
libraryDependencies ++= Seq(
"org.combinators" %% "cls-scala" % "3.0.0",
"org.combinators" %% "templating" % "1.1.0",
"org.combinators" %% "cls-scala-presentation-play-git" % "1.0.0-RC1+8-63d5cf0b",
"org.scalameta" %% "scalameta" % "4.4.13",
"com.h2database" % "h2" % "1.4.200",
"org.scalactic" %% "scalactic" % "3.2.7" % "test",
"org.scalatest" %% "scalatest" % "3.2.7" % "test",
guice
)
)
lazy val root = (Project(id = "guidemo", base = file(".")))
.settings(commonSettings: _*)
.enablePlugins(SbtTwirl)
.enablePlugins(PlayScala)
.disablePlugins(PlayLayoutPlugin)
.settings(
moduleName := "guidemo",
Compile / TwirlKeys.compileTemplates / sourceDirectories := Seq(
sourceDirectory.value / "main" / "java-templates",
sourceDirectory.value / "main" / "python-templates"
),
TwirlKeys.templateFormats += ("java" -> "org.combinators.templating.twirl.JavaFormat"),
TwirlKeys.templateImports := Seq(),
TwirlKeys.templateImports += "org.combinators.templating.twirl.Java",
TwirlKeys.templateImports += "com.github.javaparser.ast._",
TwirlKeys.templateImports += "com.github.javaparser.ast.body._",
TwirlKeys.templateImports += "com.github.javaparser.ast.comments._",
TwirlKeys.templateImports += "com.github.javaparser.ast.expr._",
TwirlKeys.templateImports += "com.github.javaparser.ast.stmt._",
TwirlKeys.templateImports += "com.github.javaparser.ast.`type`._",
Compile / unmanagedResourceDirectories += sourceDirectory.value / "main" / "java",
PlayKeys.playMonitoredFiles ++= (Compile / TwirlKeys.compileTemplates / sourceDirectories).value
)