-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
70 lines (60 loc) · 2.41 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
lazy val root = (project in file("."))
.settings(commonSettings)
val sparkVersion = settingKey[String]("Spark version")
val scalaTestVersion = settingKey[String]("ScalaTest version")
name := "spark-cef-reader"
version := "0.6"
organization := "com.elastacloud"
description := "CEF data source for Spark"
homepage := Some(url("https://github.com/elastacloud/spark-cef-reader"))
licenses += ("Apache License, Version 2.0", url("https://www.apache.org/licenses/LICENSE-2.0"))
scmInfo := Some(ScmInfo(url("https://github.com/elastacloud/spark-cef-reader"), "https://github.com/elastacloud/spark-cef-reader.git"))
developers ++= List(
Developer(id = "dazfuller", name = "Darren Fuller", email = "[email protected]", url = url("https://github.com/elastacloud")),
Developer(id = "azurecoder", name = "Richard Conway", email = "[email protected]", url = url("https://github.com/elastacloud"))
)
target := file("target") / s"spark-${sparkVersion.value}"
artifactName := { (sv: ScalaVersion, module: ModuleID, artifact: Artifact) =>
s"${artifact.name}-${sv.binary}_${sparkVersion.value}-${module.revision}.${artifact.extension}"
}
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-sql" % sparkVersion.value % Provided,
"org.apache.spark" %% "spark-core" % sparkVersion.value % Provided,
)
Compile / unmanagedSourceDirectories ++= {
if (sparkVersion.value < "3.2.0") {
Seq(baseDirectory.value / "src/main/3.0/scala")
} else if (sparkVersion.value < "3.3.0") {
Seq(baseDirectory.value / "src/main/3.2/scala")
} else if (sparkVersion.value < "3.4.0") {
Seq(baseDirectory.value / "src/main/3.3/scala")
} else {
Seq(baseDirectory.value / "src/main/3.4/scala")
}
}
// Setup test dependencies and configuration
Test / parallelExecution := false
Test / fork := true
libraryDependencies ++= Seq(
"org.scalactic" %% "scalactic" % scalaTestVersion.value % Test,
"org.scalatest" %% "scalatest" % scalaTestVersion.value % Test
)
coverageOutputCobertura := true
coverageOutputHTML := true
coverageMinimumStmtTotal := 70
coverageFailOnMinimum := false
coverageHighlighting := true
// Define common settings for the library
val commonSettings = Seq(
sparkVersion := System.getProperty("sparkVersion", "3.5.0"),
scalaVersion := {
if (sparkVersion.value < "3.2.0") {
"2.12.10"
} else if (sparkVersion.value < "3.4.0") {
"2.12.14"
} else {
"2.12.15"
}
},
scalaTestVersion := "3.2.17"
)