forked from mrpowers-io/spark-fast-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuild.sbt
49 lines (33 loc) · 1.55 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
enablePlugins(GitVersioning)
scalafmtOnCompile in Compile := true
organization := "com.github.mrpowers"
name := "spark-fast-tests"
version := "1.3.0"
val versionRegex = """^(.*)\.(.*)\.(.*)$""".r
val sparkVersion = settingKey[String]("Spark version")
val scala2_13= "2.13.8"
val scala2_12= "2.12.15"
val scala2_11= "2.11.12"
sparkVersion := System.getProperty("spark.testVersion", "3.2.1")
crossScalaVersions := {sparkVersion.value match {
case versionRegex("3", m, _) if m.toInt >= 2 => Seq(scala2_12, scala2_13)
case versionRegex("3", _ , _) => Seq(scala2_12)
case versionRegex("2", _ , _) => Seq(scala2_11)
}
}
scalaVersion := crossScalaVersions.value.head
libraryDependencies += "org.apache.spark" %% "spark-sql" % sparkVersion.value % "provided"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.1.0" % "test"
credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials")
fork in Test := true
javaOptions ++= Seq("-Xms512M", "-Xmx2048M", "-XX:+CMSClassUnloadingEnabled", "-Duser.timezone=GMT")
licenses := Seq("MIT" -> url("http://opensource.org/licenses/MIT"))
homepage := Some(url("https://github.com/MrPowers/spark-fast-tests"))
developers ++= List(
Developer("MrPowers", "Matthew Powers", "@MrPowers", url("https://github.com/MrPowers"))
)
scmInfo := Some(ScmInfo(url("https://github.com/MrPowers/spark-fast-tests"), "[email protected]:MrPowers/spark-fast-tests.git"))
updateOptions := updateOptions.value.withLatestSnapshots(false)
publishMavenStyle := true
publishTo := sonatypePublishToBundle.value
Global/useGpgPinentry := true