-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathbuild.sbt
92 lines (85 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
val javaVersion = "1.8"
import sbtrelease.ReleasePlugin.autoImport._
inThisBuild(
Seq(
organization := "software.purpledragon.xml",
scalaVersion := "2.13.2",
crossScalaVersions := Seq(scalaVersion.value, "2.11.12", "2.12.11"),
licenses += ("Apache-2.0", url("https://opensource.org/licenses/Apache-2.0")),
developers := List(
Developer("stringbean", "Michael Stringer", "@the_stringbean", url("https://github.com/stringbean"))
),
organizationName := "Michael Stringer",
organizationHomepage := Some(url("https://purpledragon.software")),
homepage := Some(url("https://stringbean.github.io/scala-xml-compare")),
startYear := Some(2017),
scmInfo := Some(
ScmInfo(
url("https://github.com/stringbean/scala-xml-compare"),
"scm:git:[email protected]:stringbean/scala-xml-compare.git")),
autoAPIMappings := true,
javacOptions ++= Seq("-source", javaVersion, "-target", javaVersion, "-Xlint"),
scalacOptions ++= Seq(s"-target:jvm-$javaVersion", "-deprecation", "-feature", "-unchecked"),
// dependencies common for all sub-projects
libraryDependencies ++= Seq(
"org.scala-lang.modules" %% "scala-xml" % "1.3.0"
),
))
lazy val commonSettings = Seq(
releasePublishArtifactsAction := PgpKeys.publishLocalSigned.value,
previewSite := {},
previewAuto := {},
)
lazy val xmlCompare = Project("xml-compare", file("xml-compare"))
.settings(commonSettings)
lazy val xmlScalatest = Project("xml-scalatest", file("xml-scalatest"))
.dependsOn(xmlCompare)
.settings(commonSettings)
lazy val xmlSpecs2 = Project("xml-specs2", file("xml-specs2"))
.dependsOn(xmlCompare)
.settings(commonSettings)
import ReleaseTransformations._
lazy val root = Project("scala-xml-compare", file("."))
.aggregate(
xmlCompare,
xmlScalatest,
xmlSpecs2
)
.settings(
skip in publish := true,
publishArtifact := false,
// ghpages
git.remoteRepo := scmInfo.value.get.connection.replace("scm:git:", ""),
ghpagesNoJekyll := true,
// site/paradox
siteSubdirName in ScalaUnidoc := "api",
addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), siteSubdirName in ScalaUnidoc),
paradoxProperties in Compile ++= Map(
"scaladoc.base_url" -> ".../api"
),
paradoxNavigationDepth := 3,
scalacOptions in Compile in doc ++= Seq(
"-doc-root-content",
baseDirectory.value + "/root-scaladoc.txt"
),
// sbt-release settings
releaseCrossBuild := true,
releaseVcsSign := true,
releaseProcess := Seq[ReleaseStep](
checkSnapshotDependencies,
inquireVersions,
runClean,
runTest,
releaseStepTask(mimaReportBinaryIssues),
setReleaseVersion,
commitReleaseVersion,
tagRelease,
publishArtifacts,
releaseStepTask(ghpagesPushSite),
setNextVersion,
commitNextVersion,
pushChanges
)
)
.enablePlugins(ScalaUnidocPlugin, GhpagesPlugin, ParadoxSitePlugin)
.disablePlugins(MimaPlugin)