-
Notifications
You must be signed in to change notification settings - Fork 6
/
build.sbt
58 lines (51 loc) · 2.22 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
import uk.gov.hmrc.DefaultBuildSettings
import uk.gov.hmrc.DefaultBuildSettings._
import scala.language.postfixOps
val appName = "api-subscription-fields"
Global / bloopAggregateSourceDependencies := true
Global / bloopExportJarClassifiers := Some(Set("sources"))
ThisBuild / scalaVersion := "2.13.12"
ThisBuild / majorVersion := 0
ThisBuild / libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
lazy val microservice = Project(appName, file("."))
.enablePlugins(PlayScala, SbtDistributablesPlugin)
.disablePlugins(JUnitXmlReportPlugin)
.settings(
libraryDependencies ++= AppDependencies(),
retrieveManaged := true
)
.settings(ScoverageSettings())
.settings(
routesImport ++= Seq(
"uk.gov.hmrc.apisubscriptionfields.model._",
"uk.gov.hmrc.apiplatform.modules.common.domain.models._",
"uk.gov.hmrc.apisubscriptionfields.controller.Binders._"
)
)
.settings(
scalacOptions ++= Seq(
// https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html
// suppress warnings in generated routes files
"-Wconf:src=routes/.*:s",
"-Xlint:-byname-implicit"
)
)
lazy val acceptance = (project in file("acceptance"))
.enablePlugins(PlayScala)
.dependsOn(microservice % "test->test")
.settings(
name := "acceptance-tests",
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-eT"),
DefaultBuildSettings.itSettings()
)
commands ++= Seq(
Command.command("cleanAll") { state => "clean" :: "acceptance/clean" :: state },
Command.command("fmtAll") { state => "scalafmtAll" :: "acceptance/scalafmtAll" :: state },
Command.command("fixAll") { state => "scalafixAll" :: "acceptance/scalafixAll" :: state },
Command.command("testAll") { state => "test" :: "acceptance/test" :: state },
Command.command("run-all-tests") { state => "testAll" :: state },
Command.command("clean-and-test") { state => "cleanAll" :: "compile" :: "run-all-tests" :: state },
Command.command("pre-commit") { state => "cleanAll" :: "fmtAll" :: "fixAll" :: "coverage" :: "testAll" :: "coverageOff" :: "coverageAggregate" :: state }
)