-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuild.sbt
More file actions
83 lines (70 loc) · 3.34 KB
/
build.sbt
File metadata and controls
83 lines (70 loc) · 3.34 KB
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
import sbt.Keys._
import sbt.Resolver
import xerial.sbt.Sonatype.sonatypeCentralHost
lazy val commonSettings = Seq(
organization := "org.combinators",
scalaVersion := "3.6.4",
crossScalaVersions := Seq("2.13.16", "3.3.5", scalaVersion.value),
resolvers ++= Resolver.sonatypeOssRepos("releases"),
resolvers += Resolver.typesafeRepo("releases"),
headerLicense := Some(HeaderLicense.ALv2("2017-2025", "Jan Bessai")),
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-feature",
"-language:implicitConversions"
),
scalacOptions ++= {
if (scalaVersion.value >= "2.13.14" && scalaVersion.value < "3.0") Seq(
// "-Xsource:3",
"-Xsource:3-cross"
)
else Nil
},
ThisBuild/scapegoatVersion := "3.1.8"
) ++ publishSettings
lazy val root = (Project(id = "templating", base = file(".")))
.settings(commonSettings: _*)
.enablePlugins(SbtTwirl)
.settings(
moduleName := "templating",
libraryDependencies ++= Seq(
"org.scalactic" %% "scalactic" % "3.2.19" % "test",
"org.scalatest" %% "scalatest" % "3.2.19" % "test",
"com.github.javaparser" % "javaparser-core" % "3.26.4",
"org.apache.commons" % "commons-text" % "1.13.1",
"commons-io" % "commons-io" % "2.19.0" % "test"
),
Test / TwirlKeys.compileTemplates / sourceDirectories += sourceDirectory.value / "test" / "java-templates",
Test / resourceDirectories += sourceDirectory.value / "resources",
TwirlKeys.templateImports := Seq(),
TwirlKeys.templateFormats += ("java" -> "org.combinators.templating.twirl.JavaFormat"),
TwirlKeys.templateImports += "scala.collection.immutable._",
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`._",
Test / TwirlKeys.compileTemplates / sourceDirectories += sourceDirectory.value / "test" / "python-templates",
TwirlKeys.templateFormats += ("py" -> "org.combinators.templating.twirl.PythonFormat"),
TwirlKeys.templateImports += "org.combinators.templating.twirl.Python"
)
lazy val publishSettings = Seq(
homepage := Some(url("https://combinators.org")),
licenses := Seq("Apache 2" -> url("http://www.apache.org/licenses/LICENSE-2.0.txt")),
scmInfo := Some(ScmInfo(url("https://www.github.com/combinators/templating"), "scm:git:git@github.com:combinators/templating.git")),
developers := List(
Developer("JanBessai", "Jan Bessai", "jan.bessai@tu-dortmund.de", url("http://noprotocol.net")),
Developer("heineman", "George T. Heineman", "heineman@wpi.edu", url("http://www.cs.wpi.edu/~heineman")),
Developer("BorisDuedder", "Boris Düdder", "boris.d@di.ku.dk", url("http://duedder.net"))
),
publishTo := sonatypePublishToBundle.value,
ThisBuild / sonatypeCredentialHost := sonatypeCentralHost,
) ++ sys.env.get("PGP_KEY_HEX").map(h => usePgpKeyHex(h)).seq
lazy val noPublishSettings = Seq(
publish := Seq.empty,
publishLocal := Seq.empty,
publishArtifact := false
)