-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuild.sbt
59 lines (55 loc) · 2.2 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
import play.sbt.routes.RoutesKeys
import sbt.Def
import scoverage.ScoverageKeys
import uk.gov.hmrc.DefaultBuildSettings
lazy val appName: String = "employment-expenses-tax-relief-guidance-frontend"
ThisBuild / majorVersion := 0
ThisBuild / scalaVersion := "2.13.13"
lazy val root = (project in file("."))
.enablePlugins(PlayScala, SbtDistributablesPlugin)
.disablePlugins(JUnitXmlReportPlugin) //Required to prevent https://github.com/scalatest/scalatest/issues/1427
.settings(DefaultBuildSettings.scalaSettings *)
.settings(DefaultBuildSettings.defaultSettings() *)
.settings(inConfig(Test)(testSettings) *)
.settings(
scalacOptions ++= Seq(
"-Wconf:cat=unused-imports&src=html/.*:s",
"-Wconf:cat=unused-imports&src=routes/.*:s"
)
)
.settings(
name := appName,
RoutesKeys.routesImport += "models._",
TwirlKeys.templateImports ++= Seq(
"play.twirl.api.HtmlFormat",
"play.twirl.api.HtmlFormat._",
"views.ViewUtils._",
"controllers.routes._",
"uk.gov.hmrc.govukfrontend.views.html.components._",
"uk.gov.hmrc.govukfrontend.views.html.components.implicits._",
"uk.gov.hmrc.hmrcfrontend.views.html.components._",
"uk.gov.hmrc.hmrcfrontend.views.html.helpers._",
),
PlayKeys.playDefaultPort := 8787,
ScoverageKeys.coverageExcludedFiles := "<empty>;Reverse.*;.*filters.*;.*handlers.*;.*components.*;.*repositories.*;" +
".*BuildInfo.*;.*javascript.*;.*FrontendAuditConnector.*;.*Routes.*;.*GuiceInjector;" +
".*ControllerConfiguration;.*LanguageSwitchController;.*target.*;",
ScoverageKeys.coverageMinimumStmtTotal := 80,
ScoverageKeys.coverageFailOnMinimum := true,
ScoverageKeys.coverageHighlighting := true,
scalacOptions ++= Seq("-feature"),
libraryDependencies ++= AppDependencies(),
dependencyOverrides += "commons-codec" % "commons-codec" % "1.12",
retrieveManaged := true,
update / evictionWarningOptions :=
EvictionWarningOptions.default.withWarnScalaVersionEviction(false),
resolvers ++= Seq(
Resolver.jcenterRepo
)
)
lazy val testSettings: Seq[Def.Setting[_]] = Seq(
fork := true,
javaOptions ++= Seq(
"-Dconfig.resource=test.application.conf"
)
)