-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
52 lines (43 loc) · 1.46 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
import uk.gov.hmrc.DefaultBuildSettings.itSettings
ThisBuild / scalaVersion := "2.13.15"
ThisBuild / majorVersion := 0
val appName = "trusts"
lazy val microservice = Project(appName, file("."))
.enablePlugins(play.sbt.PlayScala, SbtDistributablesPlugin)
.disablePlugins(JUnitXmlReportPlugin) //Required to prevent https://github.com/scalatest/scalatest/issues/1427
.settings(
PlayKeys.playDefaultPort := 9782,
libraryDependencies ++= AppDependencies(),
Compile / unmanagedSourceDirectories += baseDirectory.value / "resources",
scalacOptions ++= Seq("-feature", "-Wconf:src=routes/.*:s"),
scoverageSettings
)
lazy val it = project.in(file("it"))
.enablePlugins(PlayScala)
.dependsOn(microservice % "test->test")
.settings(itSettings(true))
lazy val scoverageSettings = {
import scoverage.ScoverageKeys
val excludedPackages = Seq(
"<empty>",
".*Reverse.*",
".*Routes.*",
".*standardError*.*",
".*main_template*.*",
"uk.gov.hmrc.BuildInfo",
"app.*",
"prod.*",
"config.*",
"testOnlyDoNotUseInAppConf.*",
"testOnly.*",
"com.kenshoo.play.metrics*.*",
".*RichJsValue.*"
)
Seq(
ScoverageKeys.coverageExcludedPackages := excludedPackages.mkString(";"),
ScoverageKeys.coverageMinimumStmtTotal := 80,
ScoverageKeys.coverageFailOnMinimum := true,
ScoverageKeys.coverageHighlighting := true
)
}
addCommandAlias("scalastyleAll", "all scalastyle Test/scalastyle it/Test/scalastyle")