forked from mrpowers-io/spark-fast-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sbt
93 lines (74 loc) · 2.95 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
enablePlugins(GitVersioning)
Compile / scalafmtOnCompile := true
organization := "com.github.mrpowers"
name := "spark-fast-tests"
version := "1.10.1"
val versionRegex = """^(.*)\.(.*)\.(.*)$""".r
val sparkVersion = settingKey[String]("Spark version")
val scala2_13 = "2.13.13"
val scala2_12 = "2.12.15"
val scala2_11 = "2.11.17"
sparkVersion := System.getProperty("spark.testVersion", "3.5.1")
crossScalaVersions := {
sparkVersion.value match {
case versionRegex("3", m, _) if m.toInt >= 2 => Seq(scala2_12, scala2_13)
case versionRegex("3", _, _) => Seq(scala2_12)
}
}
scalaVersion := crossScalaVersions.value.head
libraryDependencies += "org.apache.spark" %% "spark-sql" % sparkVersion.value % "provided"
libraryDependencies += "org.scalatest" %% "scalatest" % "3.2.18" % "test"
credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials")
Test / fork := 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-io/spark-fast-tests"))
developers ++= List(
Developer("MrPowers", "Matthew Powers", "@MrPowers", url("https://github.com/MrPowers"))
)
scmInfo := Some(ScmInfo(url("https://github.com/mrpowers-io/spark-fast-tests"), "[email protected]:MrPowers/spark-fast-tests.git"))
updateOptions := updateOptions.value.withLatestSnapshots(false)
publishMavenStyle := true
publishTo := sonatypePublishToBundle.value
Global / useGpgPinentry := true
enablePlugins(LaikaPlugin)
import laika.format.Markdown
import laika.config.SyntaxHighlighting
import laika.ast.Path.Root
import laika.ast.{Image, ExternalTarget}
import laika.helium.config._
import laika.helium.Helium
laikaTheme := Helium.defaults.site
.landingPage(
title = Some("Spark Fast Tests"),
subtitle = Some("Unit testing your Apache Spark application"),
latestReleases = Seq(
ReleaseInfo("Latest Stable Release", "1.0.0")
),
license = Some("MIT"),
titleLinks = Seq(
VersionMenu.create(unversionedLabel = "Getting Started"),
LinkGroup.create(
IconLink.external("https://github.com/mrpowers-io/spark-fast-tests", HeliumIcon.github)
)
),
linkPanel = Some(
LinkPanel(
"Documentation",
TextLink.internal(Root / "about" / "README.md", "Spark Fast Tests")
)
),
projectLinks = Seq(
LinkGroup.create(
TextLink.internal(Root / "api" / "com" / "github" / "mrpowers" / "spark" / "fast" / "tests" / "index.html", "API (Scaladoc)")
)
),
teasers = Seq(
Teaser("Fast", "Handle small dataframes effectively and provide column assertions"),
Teaser("Flexible", "Works fine with scalatest, uTest, munit")
)
)
.build
laikaIncludeAPI := true
laikaExtensions ++= Seq(Markdown.GitHubFlavor, SyntaxHighlighting)
Laika / sourceDirectories := Seq((ThisBuild / baseDirectory).value / "docs")