-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sbt
More file actions
124 lines (96 loc) · 3.96 KB
/
build.sbt
File metadata and controls
124 lines (96 loc) · 3.96 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
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
import scala.sys.process.Process
organization := "nl.surfnet"
name := "nsi-safnari"
Global / onChangedBuildSource := ReloadOnSourceChanges
githubTokenSource := (
TokenSource.GitConfig("github.token")
|| TokenSource.Environment("GITHUB_USERTOKEN")
|| TokenSource.Environment("GITHUB_TOKEN")
)
scalaVersion := "3.3.4"
scalacOptions ++= Seq(
"-deprecation",
"-feature",
"-unchecked",
"-Wunused:imports,privates,locals,params",
"-release:21"
)
//releaseSettings
lazy val mavenCommand = SettingKey[String]("maven-command", "Command to run maven")
lazy val deployDist = taskKey[File]("Deploy distribution using maven")
val playVersion = "3.0.10"
val playNsiSupportVersion = "3.1.0"
libraryDependencies ++= Seq(
guice,
ws,
jdbc,
evolutions,
"org.scala-stm" %% "scala-stm" % "0.11.1",
"org.postgresql" % "postgresql" % "42.7.7",
"org.specs2" %% "specs2-junit" % "4.20.7" % "test",
"org.specs2" %% "specs2-matcher-extra" % "4.20.7" % "test",
"org.specs2" %% "specs2-scalacheck" % "4.20.7" % "test",
"org.apache.pekko" %% "pekko-testkit" % "1.0.3" % "test",
"org.playframework" %% "play-test" % playVersion % "test",
"org.playframework" %% "play-specs2" % playVersion % "test",
"org.glassfish.hk2" % "osgi-resource-locator" % "2.4.0" % "test",
"com.sun.xml.ws" % "jaxws-rt" % "4.0.3" % "test",
"nl.surfnet" %% "play-nsi-support" % playNsiSupportVersion,
"nl.surfnet" %% "play-nsi-support" % playNsiSupportVersion % "test" classifier "tests"
)
dependencyOverrides ++= Seq(
"com.fasterxml.jackson.core" % "jackson-core" % "2.18.6",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.18.6",
"com.fasterxml.jackson.core" % "jackson-annotations" % "2.18.6",
"com.fasterxml.jackson.datatype" % "jackson-datatype-jdk8" % "2.18.6",
"com.fasterxml.jackson.datatype" % "jackson-datatype-jsr310" % "2.18.6",
"com.fasterxml.jackson.module" %% "jackson-module-scala" % "2.18.6",
"commons-beanutils" % "commons-beanutils" % "1.11.0",
"org.apache.commons" % "commons-lang3" % "3.18.0",
"org.codehaus.plexus" % "plexus-utils" % "3.6.1",
"ch.qos.logback" % "logback-core" % "1.5.25",
"ch.qos.logback" % "logback-classic" % "1.5.25"
)
val gitHeadCommitSha = settingKey[String]("git HEAD SHA")
gitHeadCommitSha := Process("git rev-parse --short HEAD").lineStream.head
lazy val root = (project in file("."))
.enablePlugins(PlayScala)
.enablePlugins(BuildInfoPlugin)
.enablePlugins(SbtTwirl)
.settings(
buildInfoKeys := Seq[BuildInfoKey](name, version, scalaVersion, gitHeadCommitSha),
buildInfoPackage := "nl.surfnet.safnari",
exportJars := true
)
// Compile all theme entry points (variables-*.less) instead of the default main.less
Assets / LessKeys.less / includeFilter := "theme-*.less"
Test / javaOptions += "-Dconfig.file=conf/test.conf"
Test / testFrameworks := Seq(TestFrameworks.Specs2)
// Override Play! defaults to enable parallel test execution
Test / testOptions := Seq(Tests.Argument(TestFrameworks.Specs2, "junitxml", "console"))
//sourceGenerators in Compile <+= buildInfo
// sbt-github-packages configuration
githubOwner := "BandwidthOnDemand"
githubRepository := "nsi-safnari"
resolvers += Resolver.githubPackages("BandwidthOnDemand")
// sbt-native-packager configuration
enablePlugins(JavaAppPackaging, UniversalDeployPlugin)
//PublishDist.publishSettings
// Disable ScalaDoc generation
Compile / doc / sources := Seq.empty
Compile / packageDoc / publishArtifact := false
Test / doc / sources := Seq.empty
Test / packageDoc / publishArtifact := false
// net.virtualvoid.sbt.graph.Plugin.graphSettings
// lazy val licenseText = settingKey[String]("Project license text.")
// licenseText := IO.read(baseDirectory.value / "LICENSE")
// headers := Map(
// "scala" -> (
// HeaderPattern.cStyleBlockComment,
// licenseText.value.split("\n").map {
// case "" => " *"
// case line => " * " ++ line
// }.mkString("/*\n", "\n", "\n */\n")
// )
// )
// publishTo := Some(Resolver.file("local-ivy", file("target")))