-
Notifications
You must be signed in to change notification settings - Fork 30
/
build.sbt
68 lines (53 loc) · 2.39 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
name := "dataframe-rules-engine"
organization := "com.databricks.labs"
version := "0.2.0"
scalaVersion := "2.12.12"
scalacOptions ++= Seq("-Xmax-classfile-name", "78")
// groupId, SCM, license information
homepage := Some(url("https://github.com/databrickslabs/dataframe-rules-engine"))
scmInfo := Some(ScmInfo(url("https://github.com/databrickslabs/dataframe-rules-engine"), "[email protected]:databrickslabs/dataframe-rules-engine.git"))
developers := List(Developer("geeksheikh", "Daniel Tomes", "[email protected]", url("https://github.com/GeekSheikh")))
licenses += ("Databricks", url("https://github.com/databrickslabs/dataframe-rules-engine/blob/master/LICENSE"))
publishMavenStyle := true
publishTo := Some(
if (version.value.endsWith("SNAPSHOT"))
Opts.resolver.sonatypeSnapshots
else
Opts.resolver.sonatypeStaging
)
libraryDependencies += "org.apache.spark" %% "spark-core" % "3.0.1" % Provided
libraryDependencies += "org.apache.spark" %% "spark-sql" % "3.0.1" % Provided
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.6" % Test
run in Compile := Defaults.runTask(fullClasspath in Compile, mainClass in(Compile, run), runner in(Compile, run)).evaluated
runMain in Compile := Defaults.runMainTask(fullClasspath in Compile, runner in(Compile, run)).evaluated
lazy val excludes = jacocoExcludes in Test := Seq()
lazy val jacoco = jacocoReportSettings in test := JacocoReportSettings(
"Jacoco Scala Example Coverage Report",
None,
JacocoThresholds(branch = 100),
Seq(JacocoReportFormats.ScalaHTML,
JacocoReportFormats.CSV),
"utf-8")
val jacocoSettings = Seq(jacoco)
lazy val jse = (project in file(".")).settings(jacocoSettings: _*)
fork in Test := true
javaOptions ++= Seq("-Xms512M", "-Xmx2048M", "-XX:+CMSClassUnloadingEnabled")
testOptions in Test += Tests.Argument(TestFrameworks.ScalaTest, "-oD")
lazy val commonSettings = Seq(
version := "0.2.0",
organization := "com.databricks.labs",
scalaVersion := "2.12.12"
)
assemblyMergeStrategy in assembly := {
case PathList("META-INF", xs@_*) => MergeStrategy.discard
case x => MergeStrategy.first
}
assemblyOption in assembly := (assemblyOption in assembly).value.copy(includeScala = false)
// exclude scala-library dependency
assemblyExcludedJars in assembly := {
val cp = (fullClasspath in assembly).value
cp filter { f =>
f.data.getName.contains("spark-core") ||
f.data.getName.contains("spark-sql")
}
}