-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
71 lines (66 loc) · 2.19 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
ThisBuild / scalaVersion := "2.13.8"
ThisBuild / organization := "io.stakenet"
val consoleDisabledOptions = Seq("-Xfatal-warnings", "-Ywarn-unused", "-Ywarn-unused-import")
lazy val baseSettings: Project => Project = {
_.settings(
scalacOptions ++= Seq(
"-Werror",
"-unchecked",
"-deprecation",
"-feature",
"-target:jvm-1.8",
"-encoding",
"UTF-8",
"-Xsource:3",
"-Wconf:src=src_managed/.*:silent",
"-Xlint:missing-interpolator",
"-Xlint:adapted-args",
"-Ywarn-dead-code",
"-Ywarn-numeric-widen",
"-Ywarn-value-discard",
"-Ywarn-unused"
),
(Compile / doc / scalacOptions) ++= Seq(
"-no-link-warnings"
),
// Some options are very noisy when using the console and prevent us using it smoothly, let's disable them
(Compile / console / scalacOptions) ~= (_ filterNot consoleDisabledOptions.contains)
)
}
lazy val playSettings: Project => Project = {
_.enablePlugins(PlayScala)
.disablePlugins(PlayLayoutPlugin)
.settings(
// remove play noisy warnings
play.sbt.routes.RoutesKeys.routesImport := Seq.empty,
libraryDependencies ++= Seq(
guice,
evolutions,
jdbc,
ws,
"com.google.inject" % "guice" % "5.1.0",
"org.playframework.anorm" %% "anorm" % "2.6.10",
"org.postgresql" % "postgresql" % "42.3.3"
)
)
}
lazy val testSettings: Project => Project = {
_.enablePlugins(PlayScala)
.settings(
libraryDependencies ++= Seq(
"com.spotify" % "docker-client" % "8.16.0" % "test",
"com.whisk" %% "docker-testkit-scalatest" % "0.9.9" % "test",
"com.whisk" %% "docker-testkit-impl-spotify" % "0.9.9" % "test",
"org.scalatestplus.play" %% "scalatestplus-play" % "5.1.0" % Test,
"org.mockito" %% "mockito-scala" % "1.17.0" % Test,
"org.mockito" %% "mockito-scala-scalatest" % "1.17.0" % Test
)
)
}
lazy val root = (project in file("."))
.configure(baseSettings, playSettings, testSettings)
.settings(
name := "eth-indexer",
libraryDependencies ++= Seq("org.web3j" % "core" % "5.0.0"),
libraryDependencies ++= Seq("com.beachape" %% "enumeratum" % "1.7.0")
)