forked from hmrc/income-tax-view-change-dynamic-stub
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
65 lines (59 loc) · 2.54 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
import play.core.PlayVersion
import play.sbt.routes.RoutesKeys
import sbt._
import uk.gov.hmrc.DefaultBuildSettings._
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin._
import uk.gov.hmrc.versioning.SbtGitVersioning.autoImport.majorVersion
val appName = "income-tax-view-change-dynamic-stub"
val compile: Seq[ModuleID] = Seq(
"uk.gov.hmrc" %% "simple-reactivemongo" % "8.0.0-play-28",
ws,
"uk.gov.hmrc" %% "bootstrap-backend-play-28" % "5.13.0",
"com.github.fge" % "json-schema-validator" % "2.2.6"
)
def test(scope: String = "test,it"): Seq[ModuleID] = Seq(
"uk.gov.hmrc" %% "bootstrap-backend-play-28" % "5.13.0" % scope,
"org.pegdown" % "pegdown" % "1.6.0" % scope,
"org.jsoup" % "jsoup" % "1.11.3" % scope,
"com.typesafe.play" %% "play-test" % PlayVersion.current % scope,
"org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0" % scope,
"org.scalatestplus" %% "mockito-3-2" % "3.1.1.0" % scope,
"com.vladsch.flexmark" % "flexmark-all" % "0.35.10" % scope
)
lazy val appDependencies: Seq[ModuleID] = compile ++ test()
lazy val playSettings: Seq[Setting[_]] = Seq.empty
lazy val scoverageSettings = {
import scoverage.ScoverageKeys
Seq(
ScoverageKeys.coverageExcludedPackages := "<empty>;Reverse.*;models/.data/..*;" +
"filters.*;.handlers.*;components.*;.*BuildInfo.*;.*FrontendAuditConnector.*;.*Routes.*;views.html.templates.*;views.html.feedback.*;config.*;" +
"controllers.feedback.*;app.*;prod.*;config.*;com.*;testOnly.*;\"",
ScoverageKeys.coverageMinimumStmtTotal := 90,
ScoverageKeys.coverageFailOnMinimum := false,
ScoverageKeys.coverageHighlighting := true
)
}
lazy val microservice = Project(appName, file("."))
.enablePlugins(play.sbt.PlayScala, SbtDistributablesPlugin)
.settings(playSettings: _*)
.settings(scalaSettings: _*)
.settings(scalaVersion := "2.12.12")
.settings(publishingSettings: _*)
.settings(scoverageSettings: _*)
.settings(defaultSettings(): _*)
.settings(majorVersion := 0)
.settings(RoutesKeys.routesImport -= "controllers.Assets.Asset")
.settings(
libraryDependencies ++= appDependencies,
retrieveManaged := true
)
.configs(IntegrationTest)
.settings(inConfig(IntegrationTest)(Defaults.itSettings): _*)
.settings(
IntegrationTest / Keys.fork := true,
IntegrationTest / unmanagedSourceDirectories := (IntegrationTest / baseDirectory) (base => Seq(base / "it")).value,
addTestReportOption(IntegrationTest, "int-test-reports"),
IntegrationTest / parallelExecution := false)
.settings(resolvers ++= Seq(
Resolver.jcenterRepo
))