@@ -7,97 +7,49 @@ import uk.gov.hmrc.DefaultBuildSettings._
77import uk .gov .hmrc .SbtAutoBuildPlugin
88import uk .gov .hmrc .sbtdistributables .SbtDistributablesPlugin
99import uk .gov .hmrc .sbtdistributables .SbtDistributablesPlugin ._
10- import uk .gov .hmrc .versioning .SbtGitVersioning
11-
12- import scala .util .Properties
10+ import bloop .integrations .sbt .BloopDefaults
1311
1412lazy val appName = " api-revocation-frontend"
1513
16- lazy val appDependencies : Seq [ModuleID ] = compile ++ test
17-
18- lazy val compile = Seq (
19- ws,
20- " uk.gov.hmrc" %% " play-partials" % " 6.9.0-play-26" ,
21- " uk.gov.hmrc" %% " bootstrap-play-26" % " 1.3.0" ,
22- " uk.gov.hmrc" %% " play-ui" % " 8.12.0-play-26" ,
23- " uk.gov.hmrc" %% " govuk-template" % " 5.48.0-play-26" ,
24- " org.apache.httpcomponents" % " httpclient" % " 4.3.3" ,
25- " org.apache.httpcomponents" % " httpcore" % " 4.3.3" ,
26- " com.typesafe.play" %% " play-json-joda" % " 2.6.10"
27- )
28-
29- lazy val wireMockVersion = " 2.21.0"
30-
31- lazy val test = Seq (
32- " uk.gov.hmrc" %% " hmrctest" % " 3.9.0-play-26" % " test" ,
33- " org.scalatest" %% " scalatest" % " 3.0.8" % " test" ,
34- " org.scalatestplus.play" %% " scalatestplus-play" % " 3.1.2" % " test" ,
35- " com.typesafe.play" %% " play-test" % PlayVersion .current % " test" ,
36- " org.pegdown" % " pegdown" % " 1.6.0" % " test" ,
37- " org.jsoup" % " jsoup" % " 1.10.2" % " test" ,
38- " com.github.tomakehurst" % " wiremock-jre8" % " 2.24.1" % " test" ,
39- " org.mockito" % " mockito-core" % " 2.13.0" % " test"
40- )
41-
42-
4314// Transitive dependencies in scalatest/scalatestplusplay drag in a newer version of jetty that is not
4415// compatible with wiremock, so we need to pin the jetty stuff to the older version.
4516// see https://groups.google.com/forum/#!topic/play-framework/HAIM1ukUCnI
46- val jettyVersion = " 9.4.26.v20200117"
4717lazy val akkaVersion = " 2.5.23"
4818lazy val akkaHttpVersion = " 10.0.15"
4919
5020val overrides : Seq [ModuleID ] = Seq (
51- " com.typesafe.akka" %% " akka-stream" % akkaVersion,
52- " com.typesafe.akka" %% " akka-protobuf" % akkaVersion,
53- " com.typesafe.akka" %% " akka-slf4j" % akkaVersion,
54- " com.typesafe.akka" %% " akka-actor" % akkaVersion,
55- " com.typesafe.akka" %% " akka-http-core" % akkaHttpVersion,
56- " org.eclipse.jetty" % " jetty-server" % jettyVersion,
57- " org.eclipse.jetty" % " jetty-servlet" % jettyVersion,
58- " org.eclipse.jetty" % " jetty-security" % jettyVersion,
59- " org.eclipse.jetty" % " jetty-servlets" % jettyVersion,
60- " org.eclipse.jetty" % " jetty-continuation" % jettyVersion,
61- " org.eclipse.jetty" % " jetty-webapp" % jettyVersion,
62- " org.eclipse.jetty" % " jetty-xml" % jettyVersion,
63- " org.eclipse.jetty" % " jetty-client" % jettyVersion,
64- " org.eclipse.jetty" % " jetty-http" % jettyVersion,
65- " org.eclipse.jetty" % " jetty-io" % jettyVersion,
66- " org.eclipse.jetty" % " jetty-util" % jettyVersion,
67- " org.eclipse.jetty.websocket" % " websocket-api" % jettyVersion,
68- " org.eclipse.jetty.websocket" % " websocket-common" % jettyVersion,
69- " org.eclipse.jetty.websocket" % " websocket-client" % jettyVersion
21+ " com.typesafe.akka" %% " akka-stream" % akkaVersion,
22+ " com.typesafe.akka" %% " akka-protobuf" % akkaVersion,
23+ " com.typesafe.akka" %% " akka-slf4j" % akkaVersion,
24+ " com.typesafe.akka" %% " akka-actor" % akkaVersion,
25+ " com.typesafe.akka" %% " akka-http-core" % akkaHttpVersion
7026)
7127
72- lazy val plugins : Seq [Plugins ] = Seq .empty
7328lazy val playSettings : Seq [Setting [_]] = Seq .empty
7429lazy val microservice = (project in file(" ." ))
75- .enablePlugins(Seq (_root_.play.sbt. PlayScala , SbtAutoBuildPlugin , SbtGitVersioning , SbtDistributablesPlugin , SbtArtifactory , SbtWeb ) ++ plugins : _* )
30+ .enablePlugins(PlayScala , SbtAutoBuildPlugin , SbtDistributablesPlugin , SbtWeb )
7631 .settings(playSettings : _* )
7732 .settings(scalaSettings : _* )
7833 .settings(publishingSettings : _* )
7934 .settings(defaultSettings(): _* )
35+ .settings(SilencerSettings (): _* )
36+ .settings(ScoverageSettings (): _* )
8037 .settings(
8138 name := appName,
8239 majorVersion := 0 ,
8340 targetJvm := " jvm-1.8" ,
84- scalaVersion := " 2.12.10" ,
85- libraryDependencies ++= appDependencies,
86- dependencyOverrides ++= overrides,
87- parallelExecution in Test := false ,
88- fork in Test := false ,
41+ scalaVersion := " 2.12.12" ,
42+ libraryDependencies ++= AppDependencies (),
43+ // dependencyOverrides ++= overrides,
8944 retrieveManaged := true ,
9045 evictionWarningOptions in update := EvictionWarningOptions .default.withWarnScalaVersionEviction(false )
9146 )
92- .settings(testOptions in Test := Seq (Tests .Filter (unitFilter)),
47+ .settings(inConfig(Test )(Defaults .testSettings))
48+ .settings(inConfig(Test )(BloopDefaults .configSettings))
49+ .settings(
50+ Test / fork := false ,
51+ Test / parallelExecution := false ,
52+ Test / testOptions += Tests .Argument (TestFrameworks .ScalaTest , " -eT" ),
53+ Test / unmanagedSourceDirectories += baseDirectory.value / " test" ,
9354 addTestReportOption(Test , " test-reports" )
9455 )
95-
96-
97- def unitFilter (name : String ): Boolean = name startsWith " unit"
98-
99-
100- // Coverage configuration
101- coverageMinimum := 78
102- coverageFailOnMinimum := true
103- coverageExcludedPackages := " <empty>;com.kenshoo.play.metrics.*;.*definition.*;prod.*;testOnlyDoNotUseInAppConf.*;app.*;uk.gov.hmrc.BuildInfo"
0 commit comments