-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbuild.sbt
62 lines (55 loc) · 2.47 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
import play.routes.compiler.InjectedRoutesGenerator
import play.sbt.routes.RoutesKeys.routesGenerator
import sbt.*
import sbt.Keys.*
import uk.gov.hmrc.DefaultBuildSettings
import uk.gov.hmrc.DefaultBuildSettings.{defaultSettings, scalaSettings}
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin
import uk.gov.hmrc.versioning.SbtGitVersioning.autoImport.majorVersion
val appName = "ated-frontend"
ThisBuild / majorVersion := 3
ThisBuild / scalaVersion := "2.13.15"
lazy val appDependencies: Seq[ModuleID] = AppDependencies()
lazy val plugins: Seq[Plugins] = Seq(play.sbt.PlayScala)
lazy val playSettings: Seq[Setting[_]] = Seq.empty
lazy val scoverageSettings = {
import scoverage.ScoverageKeys
Seq(
ScoverageKeys.coverageExcludedPackages := "<empty>;Reverse.*;app.Routes.*;prod.*;testOnlyDoNotUseInAppConf.*;config.*;uk.gov.hmrc.BuildInfo*;.*MicroserviceAuditConnector*;.*MicroserviceAuthConnector*;.*WSHttp*;uk.gov.hmrc.agentclientmandate.config.*;",
ScoverageKeys.coverageMinimumStmtTotal := 80,
ScoverageKeys.coverageFailOnMinimum := true,
ScoverageKeys.coverageHighlighting := true
)
}
lazy val microservice = Project(appName, file("."))
.enablePlugins(Seq(play.sbt.PlayScala, SbtDistributablesPlugin) ++ plugins: _*)
.settings(playSettings: _*)
.settings(scalaSettings: _*)
.settings(defaultSettings(): _*)
.settings(playSettings ++ scoverageSettings: _*)
.settings(
TwirlKeys.templateImports ++= Seq(
"views.html.helper.form",
"uk.gov.hmrc.govukfrontend.views.html.components._",
"uk.gov.hmrc.hmrcfrontend.views.html.components.implicits._",
"uk.gov.hmrc.hmrcfrontend.views.html.helpers._"
),
libraryDependencies ++= appDependencies,
retrieveManaged := true,
routesGenerator := InjectedRoutesGenerator,
Test / parallelExecution := true,
Test / fork := true,
routesImport += "config.JavaLocalDateRoutes._"
)
.disablePlugins(JUnitXmlReportPlugin)
.settings(
resolvers += Resolver.jcenterRepo,
scalacOptions += "-Wconf:src=routes/.*:s",
scalacOptions += "-Wconf:cat=unused-imports&src=html/.*:s"
)
.disablePlugins(JUnitXmlReportPlugin)
lazy val it = project
.enablePlugins(PlayScala)
.dependsOn(microservice % "test->test") // the "test->test" allows reusing test code and test dependencies
.settings(DefaultBuildSettings.itSettings())
.settings(libraryDependencies ++= AppDependencies.itDependencies)