-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
52 lines (45 loc) · 2.19 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
import uk.gov.hmrc.DefaultBuildSettings
import uk.gov.hmrc.DefaultBuildSettings._
val appName = "api-platform-outbound-soap"
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(
PlayKeys.playDefaultPort := 6703,
libraryDependencies ++= AppDependencies(),
dependencyOverrides ++= AppDependencies.axiomOverrides,
retrieveManaged := true,
// https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html
// suppress warnings in generated routes files
scalacOptions += "-Wconf:src=routes/.*:s"
)
.settings(ScoverageSettings())
.settings(
Compile / unmanagedResourceDirectories += baseDirectory.value / "app" / "resources",
Test / unmanagedResourceDirectories += baseDirectory.value / "test" / "resources"
)
lazy val it = (project in file("it"))
.enablePlugins(PlayScala)
.dependsOn(microservice % "test->test")
.settings(
name := "integration-tests",
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-eT"),
DefaultBuildSettings.itSettings(),
addTestReportOption(Test, "int-test-reports")
)
commands ++= Seq(
Command.command("cleanAll") { state => "clean" :: "it/clean" :: state },
Command.command("fmtAll") { state => "scalafmtAll" :: "it/scalafmtAll" :: state },
Command.command("fixAll") { state => "scalafixAll" :: "it/scalafixAll" :: state },
Command.command("testAll") { state => "test" :: "it/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 }
)