-
Notifications
You must be signed in to change notification settings - Fork 2
/
build.sbt
56 lines (52 loc) · 1.9 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
import sbt.Compile
import sbt.Keys.baseDirectory
import uk.gov.hmrc.DefaultBuildSettings.itSettings
ThisBuild / majorVersion := 0
ThisBuild / scalaVersion := "2.13.14"
lazy val microservice = Project("tariff-classification-frontend", file("."))
.enablePlugins(PlayScala, SbtDistributablesPlugin)
.disablePlugins(JUnitXmlReportPlugin) //Required to prevent https://github.com/scalatest/scalatest/issues/1427
.settings(
PlayKeys.playDefaultPort := 9581,
libraryDependencies ++= AppDependencies(),
CodeCoverageSettings.settings
)
.settings(
Test / fork := true,
Test / unmanagedSourceDirectories += baseDirectory.value / "test/util",
Test / resourceDirectory := baseDirectory.value / "test" / "resources",
// works only when fork is true
Test / javaOptions += "-Xmx1G"
)
.settings(
TwirlKeys.templateImports ++= Seq(
"play.twirl.api.HtmlFormat"
)
)
.settings(
routesImport ++= Seq(
"models.Sort",
"models.Search",
"models.ApplicationType",
"models.viewmodels.AssignedToMeTab",
"models.viewmodels.ATaRTab",
"models.viewmodels.SubNavigationTab",
"models.viewmodels.ManagerToolsReportsTab",
"models.viewmodels.ManagerToolsUsersTab",
"models.viewmodels.ManagerToolsKeywordsTab"
)
)
.settings(
scalacOptions ++= Seq(
"-feature",
"-Wconf:src=routes/.*:s",
"-Wconf:cat=unused-imports&src=views/.*:s"
),
Compile / unmanagedResourceDirectories += baseDirectory.value / "app" / "views" / "components" / "fop",
Test / unmanagedResourceDirectories += baseDirectory.value / "app" / "views" / "components" / "fop"
)
lazy val it = project
.enablePlugins(PlayScala)
.dependsOn(microservice % "test->test") // the "test->test" allows reusing test code and test dependencies
.settings(itSettings())
addCommandAlias("scalafmtAll", "all scalafmtSbt scalafmt Test/scalafmt it/Test/scalafmt")