-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild.sbt
More file actions
executable file
·67 lines (61 loc) · 2.59 KB
/
Copy pathbuild.sbt
File metadata and controls
executable file
·67 lines (61 loc) · 2.59 KB
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
import com.typesafe.sbt.digest.Import._
import com.typesafe.sbt.web.Import._
import uk.gov.hmrc.DefaultBuildSettings
Global / bloopAggregateSourceDependencies := true
Global / bloopExportJarClassifiers := Some(Set("sources"))
ThisBuild / majorVersion := 0
ThisBuild / scalaVersion := "2.13.18"
ThisBuild / semanticdbEnabled := true
ThisBuild / semanticdbVersion := scalafixSemanticdb.revision
lazy val microservice = Project("devhub-support-frontend", file("."))
.enablePlugins(play.sbt.PlayScala, SbtDistributablesPlugin)
.disablePlugins(JUnitXmlReportPlugin)
.settings(
pipelineStages := Seq(digest)
)
.settings(
libraryDependencies ++= AppDependencies.compile ++ AppDependencies.test
)
.settings(
Test / unmanagedSourceDirectories += baseDirectory.value / "test-utils",
Test / testOptions += Tests.Argument(TestFrameworks.ScalaTest, "-eT")
)
.settings(CodeCoverageSettings.settings: _*)
.settings(
routesImport ++= Seq(
"uk.gov.hmrc.devhubsupportfrontend.controllers.models._",
"uk.gov.hmrc.apiplatform.modules.common.domain.models._",
)
)
.settings(
TwirlKeys.templateImports ++= Seq(
"uk.gov.hmrc.hmrcfrontend.views.html.components._",
"uk.gov.hmrc.hmrcfrontend.views.html.helpers._",
"uk.gov.hmrc.apiplatform.modules.common.domain.models._",
"uk.gov.hmrc.devhubsupportfrontend.config.AppConfig",
"uk.gov.hmrc.devhubsupportfrontend.controllers"
)
)
.settings(
scalacOptions ++= Seq(
"-Wconf:cat=unused&src=views/.*\\.scala:s",
// https://www.scala-lang.org/2021/01/12/configuring-and-suppressing-warnings.html
// suppress warnings in generated routes files
"-Wconf:src=routes/.*:s",
"-Wconf:cat=unused-imports&src=html/.*:s"
)
)
lazy val it = project
.enablePlugins(PlayScala)
.dependsOn(microservice % "test->test")
.settings(DefaultBuildSettings.itSettings())
.settings(libraryDependencies ++= AppDependencies.it)
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 }
)