-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.sbt
74 lines (68 loc) · 2.7 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
import uk.gov.hmrc.DefaultBuildSettings
import uk.gov.hmrc.versioning.SbtGitVersioning.autoImport.majorVersion
lazy val appName: String = "essttp-frontend"
lazy val scalaCompilerOptions = Seq(
"-Xfatal-warnings",
"-Xlint:-missing-interpolator,_",
"-Xlint:adapted-args",
"-Ypatmat-exhaust-depth:40",
"-Ywarn-unused:implicits",
"-Ywarn-unused:imports",
"-Ywarn-unused:locals",
"-Ywarn-unused:params",
"-Ywarn-unused:patvars",
"-Ywarn-unused:privates",
"-Ywarn-value-discard",
"-Ywarn-dead-code",
"-deprecation",
"-feature",
"-unchecked",
"-language:implicitConversions",
// required in place of silencer plugin
"-Wconf:cat=unused-imports&src=html/.*:s",
"-Wconf:src=routes/.*:s"
)
lazy val root = (project in file("."))
.enablePlugins(play.sbt.PlayScala, SbtDistributablesPlugin)
.disablePlugins(JUnitXmlReportPlugin) //Required to prevent https://github.com/scalatest/scalatest/issues/1427
.settings(DefaultBuildSettings.scalaSettings: _*)
.settings(DefaultBuildSettings.defaultSettings(): _*)
.settings(majorVersion := 0)
.settings(ThisBuild / useSuperShell:= false)
.settings(
scalaVersion := "2.13.13",
name := appName,
PlayKeys.playDefaultPort := 9215,
scalacOptions ++= Seq("-feature"),
libraryDependencies ++= AppDependencies.compile ++ AppDependencies.test,
libraryDependencySchemes += "org.scala-lang.modules" %% "scala-xml" % VersionScheme.Always,
libraryDependencies += ws,
retrieveManaged := false,
(update / evictionWarningOptions) :=
EvictionWarningOptions.default.withWarnScalaVersionEviction(false),
pipelineStages := Seq(digest),
scalacOptions ++= scalaCompilerOptions,
(Compile / doc / sources) := Seq.empty,
routesImport ++= Seq("essttp.rootmodel.TaxRegime", "models.Language")
)
.settings(
commands += Command.command("runTestOnly") { state =>
state.globalLogging.full.info("running play using 'testOnlyDoNotUseInAppConf' routes...")
s"""set javaOptions += "-Dplay.http.router=testOnlyDoNotUseInAppConf.Routes"""" ::
"run" ::
s"""set javaOptions -= "-Dplay.http.router=testOnlyDoNotUseInAppConf.Routes"""" ::
state
}
)
.settings(TwirlKeys.templateImports := Seq.empty)
.settings(ScalariformSettings.scalariformSettings *)
.settings(WartRemoverSettings.wartRemoverSettings *)
.settings(ScoverageSettings.scoverageSettings *)
.settings(
(Compile / doc / scalacOptions) := Seq() //this will allow to have warnings in `doc` task
)
.settings(SbtUpdatesSettings.sbtUpdatesSettings *)
//Hint: Uncomment below lines if you want to work on both projects in tandem from intellj
// .dependsOn(cor)
// .aggregate(cor)
//lazy val cor = RootProject(file("../essttp-backend"))