-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
51 lines (32 loc) · 1.76 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
name := "Discount"
version := "3.1.0"
scalaVersion := "2.12.18"
val sparkVersion = "3.3.0"
//If compiling on JDK 8, the --release 8 flag can be safely removed (needed for backwards compatibility on later JDKs).
//Also applies to javacOptions below.
scalacOptions ++= Seq("--feature", "-release", "8")
javacOptions ++= Seq("--release=8")
resolvers += "Spark Packages Repo" at "https://dl.bintray.com/spark-packages/maven"
libraryDependencies += "org.rogach" %% "scallop" % "latest.integration"
libraryDependencies += "it.unimi.dsi" % "fastutil" % "latest.integration"
libraryDependencies += "org.scalatest" %% "scalatest" % "latest.integration" % "test"
libraryDependencies += "org.scalatestplus" %% "scalacheck-1-15" % "latest.integration" % "test"
//For Windows, to remove the dependency on winutils.exe for local filesystem access
libraryDependencies += "com.globalmentor" % "hadoop-bare-naked-local-fs" % "latest.integration"
//The "provided" configuration prevents sbt-assembly from including spark in the packaged jar.
libraryDependencies += "org.apache.spark" %% "spark-sql" % sparkVersion % "provided"
Compile / unmanagedResourceDirectories += { baseDirectory.value / "resources" }
//Do not run tests during the assembly task
//(Running tests manually is still recommended)
assembly / test := {}
//Do not include scala library JARs in assembly (provided by Spark)
assembly / assemblyOption ~= {
_.withIncludeScala(false)
}
//Run tests in a separate JVM
Test / fork := true
Test / javaOptions += "-Xmx4G"
//This option required when running tests on Java 17, as of Spark 3.3.0.
//Can safely be commented out on Java 8 or 11.
Test / javaOptions += "--add-exports=java.base/sun.nio.ch=ALL-UNNAMED"
Test / testOptions += Tests.Argument(TestFrameworks.ScalaCheck, "-verbosity", "1")