aboutsummaryrefslogtreecommitdiff
path: root/build.sbt
diff options
context:
space:
mode:
authorJakob Odersky <jakob@odersky.com>2016-06-05 21:52:43 -0700
committerJakob Odersky <jakob@odersky.com>2016-06-07 17:10:52 -0700
commit480f4b09a1a222368609771086176caabc6aad28 (patch)
tree0a70b8cefb11a011d04effd51417452823a6c395 /build.sbt
parenteac9a5ba8fbaebb43e38256630201c6f03f4debf (diff)
downloadakka-serial-480f4b09a1a222368609771086176caabc6aad28.tar.gz
akka-serial-480f4b09a1a222368609771086176caabc6aad28.tar.bz2
akka-serial-480f4b09a1a222368609771086176caabc6aad28.zip
Generate documentation
Diffstat (limited to 'build.sbt')
-rw-r--r--build.sbt39
1 files changed, 39 insertions, 0 deletions
diff --git a/build.sbt b/build.sbt
new file mode 100644
index 0000000..15ca193
--- /dev/null
+++ b/build.sbt
@@ -0,0 +1,39 @@
+import flow.{FlowBuild, Release}
+
+FlowBuild.commonSettings
+
+Release.settings
+
+/* Settings related to publishing */
+publishArtifact := false
+publish := ()
+publishLocal := ()
+// make sbt-pgp happy
+publishTo := Some(Resolver.file("Unused transient repository", target.value / "unusedrepo"))
+
+/* Generate documentation */
+enablePlugins(PreprocessPlugin)
+sourceDirectory in Preprocess := (baseDirectory in ThisBuild).value / "Documentation"
+preprocessVars in Preprocess := Map(
+ "version" -> version.value,
+ "native_major" -> "3",
+ "native_minor" -> "0"
+)
+
+/* Add scaladoc to documentation */
+enablePlugins(SiteScaladocPlugin)
+unidocSettings
+scalacOptions in (ScalaUnidoc, doc) ++= Seq(
+ "-groups", // Group similar methods together based on the @group annotation.
+ "-diagrams", // Show classs hierarchy diagrams (requires 'dot' to be available on path)
+ "-implicits", // Add methods "inherited" through implicit conversions
+ "-sourcepath", baseDirectory.value.getAbsolutePath
+) ++ {
+ val latestTag: String = "git describe --abbrev=0".!!
+ Opts.doc.sourceUrl(
+ s"https://github.com/jodersky/flow/blob/$latestTag€{FILE_PATH}.scala"
+ )
+}
+siteMappings ++= (mappings in (ScalaUnidoc, packageDoc)).value.map{ case (file, path) =>
+ (file, "api/" + path)
+}