-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
34 lines (31 loc) · 1.89 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
import play.sbt.PlayImport.PlayKeys.playDefaultPort
import sbt.Tests.{Group, SubProcess}
import scoverage.ScoverageKeys
import uk.gov.hmrc.SbtArtifactory
import uk.gov.hmrc.sbtdistributables.SbtDistributablesPlugin.publishingSettings
val appName: String = "transit-movement-api"
lazy val microservice = Project(appName, file("."))
.enablePlugins(Seq(play.sbt.PlayScala, SbtAutoBuildPlugin, SbtGitVersioning, SbtDistributablesPlugin, SbtArtifactory): _*)
.configs(IntegrationTest)
.settings(inConfig(IntegrationTest)(Defaults.itSettings): _*)
.settings(publishingSettings: _*)
.settings(
majorVersion := 0,
ScoverageKeys.coverageExcludedFiles := "<empty>;com.kenshoo.play.metrics.*;.*definition.*;prod.*;testOnlyDoNotUseInAppConf.*;app.*;.*BuildInfo.*;.*Routes.*;.*repositories.*;.*controllers.test.*;.*services.test.*",
ScoverageKeys.coverageMinimum := 90,
ScoverageKeys.coverageFailOnMinimum := false,
ScoverageKeys.coverageHighlighting := true,
playDefaultPort := 8266,
libraryDependencies ++= AppDependencies(),
evictionWarningOptions in update := EvictionWarningOptions.default.withWarnScalaVersionEviction(false),
resolvers += Resolver.jcenterRepo,
resolvers += "emueller-bintray" at "http://dl.bintray.com/emueller/maven",
unmanagedResourceDirectories in Compile += baseDirectory.value / "resources",
unmanagedSourceDirectories in IntegrationTest := (baseDirectory in IntegrationTest) (base => Seq(base / "it", base / "test-common")).value,
unmanagedSourceDirectories in Test := (baseDirectory in Test) (base => Seq(base / "test", base / "test-common")).value,
testGrouping in IntegrationTest := oneForkedJvmPerTest((definedTests in IntegrationTest).value)
)
def oneForkedJvmPerTest(tests: Seq[TestDefinition]): Seq[Group] =
tests map {
test => Group(test.name, Seq(test), SubProcess(ForkOptions(runJVMOptions = Seq("-Dtest.name=" + test.name))))
}