-
Notifications
You must be signed in to change notification settings - Fork 7
/
build.sbt
70 lines (67 loc) · 2.48 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
name := "play-webpack-typescript-react"
lazy val commonSettings = Seq(
organization := "com.example",
version := "0.0.1",
scalaVersion := "2.12.4",
scalacOptions ++= Seq(
"-target:jvm-1.8",
"-encoding",
"UTF-8",
"-unchecked",
"-deprecation",
"-Xfatal-warnings",
"-Xfuture",
"-Xlint",
"-Yno-adapted-args",
// "-Yno-imports", // no automatic import of Predef (removes irritating implicits)
// "-Yno-predef", // no automatic imports at all; all symbols must be imported explicitly
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Ywarn-unused",
"-Ywarn-unused-import"
),
dependencyOverrides ++= Set(
"org.scala-lang" % "scala-library" % scalaVersion.value,
"org.scala-lang" % "scala-reflect" % scalaVersion.value
),
scapegoatVersion := "1.3.3",
wartremoverErrors ++= Warts.unsafe,
crossScalaVersions := Seq("2.11.11", "2.12.1"),
scalafmtVersion in ThisBuild := "1.3.0",
scalafmtOnCompile in ThisBuild := true,
ignoreErrors in (ThisBuild, scalafmt) := false
)
lazy val root = (project in file("."))
.settings(commonSettings: _*)
.settings(
name := "play-webpack-typescript-react",
scalacOptions ~= { (options: Seq[String]) =>
options filterNot (_ == "-Ywarn-unused-import")
},
coverageExcludedPackages := "controllers\\.Reverse.*;controllers\\.javascript\\.Reverse.*;views\\.html\\..*",
wartremoverExcluded ++= Seq(
crossTarget.value / "routes" / "main" / "router" / "Routes.scala",
crossTarget.value / "routes" / "main" / "router" / "RoutesPrefix.scala"
),
scapegoatIgnoredFiles := Seq(
crossTarget.value + "/routes/main/controllers/ReverseRoutes.scala",
crossTarget.value + "/routes/main/controllers/javascript/JavaScriptReverseRoutes.scala",
crossTarget.value + "/routes/main/router/Routes.scala",
crossTarget.value + "/twirl/.*.template.scala"
),
PlayKeys.playRunHooks += WebpackDevServer(baseDirectory.value, streams.value.log),
PlayKeys.playMonitoredFiles ++= (sourceDirectories in (Compile, TwirlKeys.compileTemplates)).value,
pipelineStages := Seq(webpack, digest, gzip),
TwirlKeys.templateImports := Seq()
)
.settings(
libraryDependencies ++= Seq(
guice,
ws,
"org.scalatestplus.play" %% "scalatestplus-play" % "3.1.2" % Test
))
.enablePlugins(PlayScala)
.disablePlugins(PlayLayoutPlugin)
.enablePlugins(Webpack)
addCompilerPlugin("org.psywerx.hairyfotr" %% "linter" % "0.1.17")