-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathbuild.sbt
93 lines (80 loc) · 3.71 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
ThisBuild / organization := "com.swoop"
ThisBuild / version := scala.io.Source.fromFile("VERSION").mkString.stripLineEnd
ThisBuild / scalaVersion := "2.12.11"
ThisBuild / crossScalaVersions := Seq("2.12.11")
ThisBuild / javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
val sparkVersion = "3.2.0"
lazy val scalaSettings = Seq(
scalaVersion := "2.12.11",
crossScalaVersions := Seq("2.12.11"),
scalacOptions in(Compile, doc) ++= Seq("-doc-root-content", baseDirectory.value + "/docs/root-doc.txt"),
scalacOptions in(Compile, doc) ++= Seq("-groups", "-implicits"),
javacOptions in(Compile, doc) ++= Seq("-notimestamp", "-linksource"),
javacOptions ++= Seq("-source", "1.8", "-target", "1.8")
)
lazy val alchemy = (project in file("."))
.settings(
name := "spark-alchemy",
scalaSource in Compile := baseDirectory.value / "alchemy/src/main/scala",
scalaSource in Test := baseDirectory.value / "alchemy/src/test/scala",
resourceDirectory in Compile := baseDirectory.value / "alchemy/src/main/resources",
resourceDirectory in Test := baseDirectory.value / "alchemy/src/test/resources",
libraryDependencies ++= Seq(
"org.scalatest" %% "scalatest" % "3.2.2" % Test,
"net.agkn" % "hll" % "1.6.0",
"org.postgresql" % "postgresql" % "42.2.8" % Test,
"org.apache.spark" %% "spark-sql" % sparkVersion % "provided"
),
fork in Test := true, // required for Spark
scalaSettings
)
.enablePlugins(SiteScaladocPlugin)
.enablePlugins(BuildInfoPlugin)
.enablePlugins(GitVersioning, GitBranchPrompt)
lazy val docs = project
.in(file("docs"))
.settings(
moduleName := "spark-alchemy-docs",
name := moduleName.value,
scalaSettings,
micrositeSettings
)
.dependsOn(alchemy)
.enablePlugins(MicrositesPlugin)
lazy val micrositeSettings = Seq(
micrositeName := "Spark Alchemy",
micrositeDescription := "Useful extensions to Apache Spark",
micrositeAuthor := "Swoop",
micrositeHomepage := "https://www.swoop.com",
micrositeBaseUrl := "/spark-alchemy",
micrositeDocumentationUrl := "/spark-alchemy/docs.html",
micrositeGithubOwner := "swoop-inc",
micrositeGithubRepo := "spark-alchemy",
micrositeHighlightTheme := "tomorrow",
micrositeTheme := "pattern",
micrositePushSiteWith := GitHub4s,
micrositeGithubToken := sys.env.get("GITHUB_TOKEN"),
micrositeImgDirectory := (Compile / resourceDirectory).value / "site" / "images",
micrositeCssDirectory := (Compile / resourceDirectory).value / "site" / "styles",
micrositeJsDirectory := (Compile / resourceDirectory).value / "site" / "scripts"
)
// Speed up dependency resolution (experimental)
// @see https://www.scala-sbt.org/1.0/docs/Cached-Resolution.html
ThisBuild / updateOptions := updateOptions.value.withCachedResolution(true)
// @see https://wiki.scala-lang.org/display/SW/Configuring+SBT+to+Generate+a+Scaladoc+Root+Page
autoAPIMappings := true
buildInfoPackage := "com.swoop.alchemy"
// SBT header settings
ThisBuild / organizationName := "Swoop, Inc"
ThisBuild / startYear := Some(2018)
ThisBuild / licenses += ("Apache-2.0", new URL("https://www.apache.org/licenses/LICENSE-2.0.txt"))
ThisBuild / credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials")
ThisBuild / homepage := Some(url("https://swoop-inc.github.io/spark-alchemy/"))
ThisBuild / developers ++= List(
Developer("ssimeonov", "Simeon Simeonov", "@ssimeonov", url("https://github.com/ssimeonov"))
)
ThisBuild / scmInfo := Some(ScmInfo(url("https://github.com/swoop-inc/spark-alchemy"), "[email protected]:swoop-inc/spark-alchemy.git"))
ThisBuild / updateOptions := updateOptions.value.withLatestSnapshots(false)
ThisBuild / publishMavenStyle := true
ThisBuild / publishTo := sonatypePublishToBundle.value
Global / useGpgPinentry := true