-
Notifications
You must be signed in to change notification settings - Fork 16
/
build.sbt
85 lines (75 loc) · 3.03 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
name := "spark-records"
com.typesafe.sbt.SbtGit.versionWithGit
organization := "com.swoop"
version := "3.0.1"
val vSpark = "3.0.1"
credentials += Credentials(Path.userHome / ".sbt" / "sonatype_credentials")
licenses +=("Apache-2.0", url("http://apache.org/licenses/LICENSE-2.0"))
homepage := Some(url("https://github.com/swoop-inc/spark-records"))
developers ++= List(
Developer("ssimeonov", "Simeon Simeonov", "@ssimeonov", url("https://github.com/ssimeonov"))
)
scmInfo := Some(ScmInfo(url("https://github.com/swoop-inc/spark-records"), "[email protected]:swoop-inc/spark-records.git"))
updateOptions := updateOptions.value.withLatestSnapshots(false)
publishMavenStyle := true
publishTo := sonatypePublishToBundle.value
Global/useGpgPinentry := true
// Speed up dependency resolution (experimental)
updateOptions := updateOptions.value.withCachedResolution(true)
lazy val scalaSettings = Seq(
scalaVersion := "2.12.12",
crossScalaVersions := Seq("2.12.12"),
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 testSettings = Seq(
testOptions in Test += Tests.Argument("-oS"),
parallelExecution in Test := false,
fork in Test := true,
)
lazy val sparkRecords = project
.in(file("."))
.settings(
moduleName := "spark-records",
name := moduleName.value,
autoAPIMappings := true,
scalaSettings,
testSettings,
headerLicense := Some(HeaderLicense.ALv2("2017", "Simeon Simeonov and Swoop, Inc.", HeaderLicenseStyle.SpdxSyntax)),
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % vSpark % "provided" withSources(),
"org.apache.spark" %% "spark-sql" % vSpark % "provided" withSources() excludeAll ExclusionRule(organization = "org.mortbay.jetty"),
"org.apache.logging.log4j" % "log4j-core" % "2.7" % "provided" withSources(),
"org.apache.logging.log4j" % "log4j-api" % "2.7" % "provided" withSources(),
"org.scalatest" %% "scalatest" % "3.0.4" % "test" withSources()
)
)
.enablePlugins(SiteScaladocPlugin)
lazy val docs = project
.in(file("docs"))
.settings(
moduleName := "spark-records-docs",
name := moduleName.value,
scalaSettings,
micrositeSettings,
libraryDependencies ++= Seq(
"org.apache.spark" %% "spark-core" % vSpark,
"org.apache.spark" %% "spark-sql" % vSpark
)
)
.dependsOn(sparkRecords)
.enablePlugins(MicrositesPlugin)
lazy val micrositeSettings = Seq(
micrositeCompilingDocsTool := WithTut,
micrositeName := "Spark Records",
micrositeDescription := "bulletproof Spark jobs",
micrositeAuthor := "Swoop",
micrositeHomepage := "http://www.swoop.com",
micrositeBaseUrl := "spark-records",
micrositeDocumentationUrl := "/spark-records/docs.html",
micrositeGithubOwner := "swoop-inc",
micrositeGithubRepo := "spark-records",
micrositeHighlightTheme := "tomorrow"
)