-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbuild.sbt
74 lines (70 loc) · 2.97 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
61
62
63
64
65
66
67
68
69
70
71
72
73
import play.sbt.routes.RoutesKeys
import sbt.Def
import scoverage.ScoverageKeys
import uk.gov.hmrc.DefaultBuildSettings
import uk.gov.hmrc.versioning.SbtGitVersioning.autoImport.majorVersion
lazy val appName: String = "pension-scheme-accounting-for-tax-frontend"
lazy val root = (project in file("."))
.disablePlugins(JUnitXmlReportPlugin) //Required to prevent https://github.com/scalatest/scalatest/issues/1427
.enablePlugins(PlayScala, SbtDistributablesPlugin)
.settings(DefaultBuildSettings.scalaSettings: _*)
.settings(DefaultBuildSettings.defaultSettings(): _*)
.settings(scalaVersion := "2.13.12")
.settings(
Test / parallelExecution := true
)
.settings(inConfig(Test)(testSettings): _*)
.settings(majorVersion := 0)
.settings(
name := appName,
RoutesKeys.routesImport ++= Seq("models._", "models.OptionBinder._", "models.LocalDateBinder._", "java.time.LocalDate",
"models.financialStatement.PsaFSChargeType", "models.financialStatement.PenaltyType._", "models.ChargeType._"),
TwirlKeys.templateImports ++= Seq(
"play.twirl.api.HtmlFormat",
"play.twirl.api.HtmlFormat._",
"viewmodels.govuk.all._",
"viewmodels.govuk.all._",
"uk.gov.hmrc.govukfrontend.views.html.components._",
"uk.gov.hmrc.hmrcfrontend.views.Implicits._",
"uk.gov.hmrc.hmrcfrontend.views.html.components._",
"uk.gov.hmrc.hmrcfrontend.views.html.helpers._",
"models.Mode",
"models.Index",
"models.AccessType",
"models.ChargeType",
"models.ChargeType.ChargeTypeAnnualAllowance",
"models.ChargeType.ChargeTypeLifetimeAllowance",
"models.ChargeType.ChargeTypeOverseasTransfer",
"controllers.routes._"
),
PlayKeys.playDefaultPort := 8206,
ScoverageKeys.coverageExcludedFiles := "<empty>;Reverse.*;.*handlers.*;.*repositories.*;" +
".*BuildInfo.*;.*javascript.*;.*Routes.*;.*GuiceInjector;" +
".*ControllerConfiguration;.*TestController;.*LanguageSwitchController",
ScoverageKeys.coverageMinimumStmtTotal := 80,
ScoverageKeys.coverageFailOnMinimum := true,
ScoverageKeys.coverageHighlighting := true,
scalacOptions ++= Seq("-feature", "-deprecation"),
libraryDependencies ++= AppDependencies(),
retrieveManaged := true,
resolvers ++= Seq(
Resolver.jcenterRepo
),
Concat.groups := Seq(
"javascripts/application.js" -> group(Seq("lib/govuk-frontend/govuk/all.js", "lib/hmrc-frontend/hmrc/all.js",
"javascripts/aft.js"
))
),
uglifyCompressOptions := Seq("unused=false", "dead_code=false"),
scalacOptions += "-Wconf:src=routes/.*:s",
scalacOptions += "-Wconf:cat=unused-imports&src=html/.*:s",
// Removed uglify due to node 20 compile issues.
// Suspected cause minification of already minified location-autocomplete.min.js -Pavel Vjalicin
Assets / pipelineStages := Seq(concat),
)
lazy val testSettings: Seq[Def.Setting[_]] = Seq(
fork := true,
javaOptions ++= Seq(
"-Dconfig.resource=test.application.conf"
)
)