-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sbt
69 lines (59 loc) · 2.33 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
lazy val testAll = TaskKey[Unit]("test-all")
lazy val E2ETest = config("e2e") extend Test
lazy val root = (project in file("."))
.enablePlugins(JavaAppPackaging)
.configs(E2ETest)
.settings(
name := "faunadb-importer",
version := "2.0.2-SNAPSHOT",
scalaVersion := "2.12.2",
scalacOptions ++= Seq(
"-unchecked",
"-deprecation",
"-feature",
"-Xfatal-warnings"
),
javaOptions ++= Seq(
"-server",
"-XX:+UseCompressedOops",
"-XX:+UseStringDeduplication"
),
fork := true,
libraryDependencies ++= Seq(
// Main
"com.faunadb" %% "faunadb-scala" % "2.2.0",
"io.monix" %% "monix" % "2.3.0",
"com.github.scopt" %% "scopt" % "3.5.0",
"ch.qos.logback" % "logback-classic" % "1.2.3",
"com.fasterxml.jackson.core" % "jackson-core" % "2.8.8",
"com.fasterxml.jackson.core" % "jackson-databind" % "2.8.8",
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-csv" % "2.8.8",
"com.fasterxml.jackson.dataformat" % "jackson-dataformat-yaml" % "2.8.8",
"org.mapdb" % "mapdb" % "3.0.4",
// Test
"org.scalatest" %% "scalatest" % "3.0.1" % "test",
"org.scalamock" %% "scalamock-scalatest-support" % "3.5.0" % "test"
),
// E2E Testing
inConfig(E2ETest)(Defaults.testSettings) ++ Seq(
scalaSource in E2ETest := baseDirectory.value / "src/e2e/scala",
resourceDirectory in E2ETest := baseDirectory.value / "src/e2e/resources/"
),
testAll := (test in E2ETest).dependsOn(test in Test).value,
// Assembly
assemblyJarName in assembly := s"faunadb-importer-${version.value}.jar",
test in assembly := Some(testAll.value),
// Packaging
mappings in Universal := {
val fatJar = assembly.value
val baseDir = (baseDirectory in Compile).value
val allNonJars = (mappings in Universal).value filter { case (_, name) => !name.endsWith(".jar") }
allNonJars ++ Seq(
(baseDir / "README.md") -> "README.md",
fatJar -> s"lib/${fatJar.getName}"
)
},
scriptClasspath := Seq((assemblyJarName in assembly).value),
bashScriptExtraDefines ++= javaOptions.value map (opt => s"""addJava "$opt""""),
batScriptExtraDefines ++= javaOptions.value filter (_ != "server") map (opt => s"set _JAVA_OPTS=%_JAVA_OPTS% $opt") // -server is not supported on Win32
)