-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
75 lines (58 loc) · 2.01 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
73
74
75
name := "SparkTest"
version := "0.1"
scalaVersion := "2.11.12"
resolvers += Resolver.sonatypeRepo("public")
val gitCommitString = SettingKey[String]("gitCommit")
gitCommitString := git.gitHeadCommit.value.getOrElse("Not Set")
lazy val root = (project in file(".")).
enablePlugins(BuildInfoPlugin).
settings(
buildInfoKeys := Seq[BuildInfoKey](gitCommitString),
buildInfoPackage := "experiments",
buildInfoOptions += BuildInfoOption.ToMap)
// Compiler options
scalacOptions ++= Seq(
// "-encoding", "utf8", // Option and arguments on same line
// "-Xfatal-warnings", // New lines for each options
"-deprecation",
"-unchecked",
"-language:implicitConversions",
// "-language:higherKinds",
// "-language:existentials",
"-language:postfixOps",
"-optimize"
// "-Xdisable-assertions"
)
resolvers += "Spark Packages Repo" at "http://dl.bintray.com/spark-packages/maven"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.0.5" % "test"
libraryDependencies += "org.scalacheck" %% "scalacheck" % "1.14.0" % "test"
libraryDependencies += "MrPowers" % "spark-fast-tests" % "0.17.1-s_2.11"
libraryDependencies += "com.github.scopt" %% "scopt" % "4.0.0-RC2"
// Compile src's to Jar
test in assembly := {}
assemblyExcludedJars in assembly := {
val cp = (fullClasspath in assembly).value
cp filter {
_.data.toString.startsWith("/home/per/workspace/SparkTest/lib/")
}
}
assemblyMergeStrategy in assembly := {
case "manifest.mf" => {
MergeStrategy.discard
}
case x => {
val oldStrategy = (assemblyMergeStrategy in assembly).value
oldStrategy(x)
}
}
// Compile tests to jar.
Project.inConfig(Test)(baseAssemblySettings)
assemblyJarName in (Test, assembly) := s"${name.value}-test-${version.value}.jar"
test in (Test, assembly) := {}
mainClass in (Test, assembly) := Some("correctnessTesting.Runner")
assemblyExcludedJars in (Test, assembly) := {
val cp = (fullClasspath in assembly).value
cp filter {
_.data.toString.startsWith("/home/per/workspace/SparkTest/lib/")
}
}