-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
76 lines (69 loc) · 2.56 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
74
75
76
import play.sbt.routes.RoutesKeys
import sbt.Def
import scoverage.ScoverageKeys
import uk.gov.hmrc.versioning.SbtGitVersioning.autoImport.majorVersion
lazy val appName: String = "trader-goods-profiles-frontend"
ThisBuild / majorVersion := 0
ThisBuild / scalaVersion := "2.13.12"
lazy val microservice = (project in file("."))
.enablePlugins(PlayScala, SbtDistributablesPlugin)
.disablePlugins(JUnitXmlReportPlugin) //Required to prevent https://github.com/scalatest/scalatest/issues/1427
.settings(inConfig(Test)(testSettings) *)
.settings(ThisBuild / useSuperShell := false)
.settings(
name := appName,
RoutesKeys.routesImport ++= Seq(
"models._",
"uk.gov.hmrc.play.bootstrap.binders.RedirectUrl"
),
TwirlKeys.templateImports ++= Seq(
"play.twirl.api.HtmlFormat",
"play.twirl.api.HtmlFormat._",
"uk.gov.hmrc.govukfrontend.views.html.components._",
"uk.gov.hmrc.hmrcfrontend.views.html.components._",
"uk.gov.hmrc.hmrcfrontend.views.html.helpers._",
"uk.gov.hmrc.hmrcfrontend.views.config._",
"views.ViewUtils._",
"models.Mode",
"controllers.routes._",
"viewmodels.govuk.all._"
),
PlayKeys.playDefaultPort := 10905,
ScoverageKeys.coverageExcludedFiles := "<empty>;Reverse.*;.*handlers.*;.*components.*;.*Routes.*;",
ScoverageKeys.coverageExcludedPackages := "views.*; viewmodels.* ",
ScoverageKeys.coverageMinimumStmtTotal := 90,
ScoverageKeys.coverageFailOnMinimum := true,
ScoverageKeys.coverageHighlighting := true,
scalacOptions ++= Seq(
"-feature",
"-rootdir",
baseDirectory.value.getCanonicalPath,
"-Wconf:cat=deprecation:ws,cat=feature:ws,cat=optimizer:ws,src=target/.*:s"
),
libraryDependencies ++= AppDependencies(),
retrieveManaged := true,
resolvers ++= Seq(Resolver.jcenterRepo),
// concatenate js
Concat.groups := Seq(
"javascripts/application.js" ->
group(
Seq(
"javascripts/app.js"
)
)
),
pipelineStages := Seq(digest),
Assets / pipelineStages := Seq(concat)
)
lazy val testSettings: Seq[Def.Setting[?]] = Seq(
fork := true,
unmanagedSourceDirectories += baseDirectory.value / "test-utils",
scalafmtOnCompile := true
)
lazy val it =
(project in file("it"))
.enablePlugins(PlayScala)
.dependsOn(microservice % "test->test")
addCommandAlias("testAndCoverage", ";clean;coverage;test;it/test;coverageReport")
addCommandAlias("prePR", ";scalafmt;test:scalafmt;testAndCoverage")
addCommandAlias("preMerge", ";scalafmtCheckAll;testAndCoverage")