-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathbuild.sbt
49 lines (42 loc) · 1.61 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
import play.sbt.routes.RoutesKeys
import uk.gov.hmrc.DefaultBuildSettings
import sbt.Keys.*
import sbt.*
import uk.gov.hmrc.versioning.SbtGitVersioning.autoImport.majorVersion
val appName = "business-matching"
ThisBuild / majorVersion := 2
ThisBuild / scalaVersion := "2.13.15"
lazy val playSettings : Seq[Setting[?]] = Seq.empty
lazy val plugins : Seq[Plugins] = Seq(play.sbt.PlayScala, SbtDistributablesPlugin)
lazy val scoverageSettings = {
import scoverage.ScoverageKeys
Seq(
ScoverageKeys.coverageExcludedPackages := "<empty>;Reverse.*;views.html.*;app.Routes.*;prod.*;uk.gov.hmrc.*;testOnlyDoNotUseInAppConf.*;forms.*;config.*;",
ScoverageKeys.coverageMinimumStmtTotal := 100,
ScoverageKeys.coverageFailOnMinimum := true,
ScoverageKeys.coverageHighlighting := true
)
}
lazy val microservice = Project(appName, file("."))
.enablePlugins(plugins *)
.settings((playSettings ++ scoverageSettings) *)
.settings(
RoutesKeys.routesImport := Seq.empty,
libraryDependencies ++= AppDependencies.compile ++ AppDependencies.test,
Test / parallelExecution := false,
Test / fork := true,
retrieveManaged := true,
routesGenerator := InjectedRoutesGenerator,
scalacOptions += "-Wconf:src=routes/.*:s"
)
.settings(
resolvers ++= Seq(
Resolver.typesafeRepo("releases"),
Resolver.jcenterRepo
)
)
lazy val it = project
.enablePlugins(PlayScala)
.dependsOn(microservice % "test->test") // the "test->test" allows reusing test code and test dependencies
.settings(DefaultBuildSettings.itSettings())
.settings(libraryDependencies ++= AppDependencies.itDependencies)