-
Notifications
You must be signed in to change notification settings - Fork 10
/
build.sbt
84 lines (78 loc) · 2.97 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
import Dependencies._
import xerial.sbt.Sonatype.GitHubHosting
val sparkVersion = settingKey[String]("Spark version")
val currVersion = "0.1.14"
ThisBuild / organization := "com.github.timgent"
ThisBuild / organizationName := "timgent"
lazy val root = (project in file("."))
.settings(
name := "data-flare",
sparkVersion := System.getProperty("sparkVersion", "3.2.0"),
scalaVersion := {
if (sparkVersion.value >= "2.4.0")
"2.12.10"
else
"2.11.11"
},
crossScalaVersions := {
if (sparkVersion.value >= "3.0.0")
Seq("2.12.10")
else if (sparkVersion.value >= "2.4.0")
Seq("2.12.10", "2.11.11")
else
Seq("2.11.11")
},
version := s"${sparkVersion.value}_$currVersion",
libraryDependencies ++= sparkDependencies(sparkVersion.value) ++
elastic4sDependencies(scalaVersion.value) ++
List(
scalaTest,
scalaMock,
enumeratum,
enumeratumCirce,
cats,
spire,
scalacheck,
scalacheckToolboxDatetime,
scalacheckToolboxMagic,
scalacheckToolboxCombinators
),
fork in Test := true,
parallelExecution in Test := false,
javaOptions ++= Seq("-Xms512M", "-Xmx2048M", "-XX:MaxPermSize=2048M", "-XX:+CMSClassUnloadingEnabled"),
assemblyShadeRules in assembly ++= Seq(
// Required due to conflicting shapeless versions between circe and spark libraries
ShadeRule
.rename("com.chuusai.shapeless.**" -> "shapeless_new.@1")
.inLibrary("com.chuusai" %% "shapeless" % "2.3.2")
.inProject
)
)
lazy val docs = project // new documentation project
.in(file("data-flare-docs")) // important: it must not be docs/
.dependsOn(root)
.enablePlugins(MdocPlugin, DocusaurusPlugin, ScalaUnidocPlugin)
.settings(
moduleName := "data-flare-docs",
unidocProjectFilter in (ScalaUnidoc, unidoc) := inProjects(root),
target in (ScalaUnidoc, unidoc) := (baseDirectory in LocalRootProject).value / "website" / "static" / "api",
cleanFiles += (target in (ScalaUnidoc, unidoc)).value,
docusaurusCreateSite := docusaurusCreateSite.dependsOn(unidoc in Compile).value,
docusaurusPublishGhpages := docusaurusPublishGhpages.dependsOn(unidoc in Compile).value,
mdocIn := new File("docs-source"),
mdocVariables := Map("VERSION" -> currVersion)
)
scalacOptions += "-Ypartial-unification"
developers := List(Developer("timgent", "Tim Gent", "tim.gent@gmail.com", url("https://github.com/timgent")))
scmInfo := Some(
ScmInfo(
url("https://github.com/timgent/data-flare.git"),
"scm:git@github.com:timgent/data-flare.git"
)
)
homepage := Some(url("https://github.com/timgent/data-flare"))
licenses := Seq("Apache License 2.0" -> url("http://www.apache.org/licenses/LICENSE-2.0.html"))
publishTo := sonatypePublishToBundle.value
sonatypeProfileName := "com.github.timgent"
publishMavenStyle := true
sonatypeProjectHosting := Some(GitHubHosting("timgent", "data-flare", "tim.gent@gmail.com"))