Skip to content

Commit

Permalink
Publish scaladoc (closes #113)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFradet committed Oct 3, 2018
1 parent 9f341d5 commit 2584cae
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 2 additions & 0 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
*/

lazy val root = project.in(file("."))
.enablePlugins(ScalaUnidocPlugin, GhpagesPlugin)
.settings(
name := "scala-forex",
version := "0.5.0",
Expand All @@ -22,6 +23,7 @@ lazy val root = project.in(file("."))
.settings(BuildSettings.buildSettings)
.settings(BuildSettings.publishSettings)
.settings(BuildSettings.formattingSettings)
.settings(BuildSettings.docsSettings)
.settings(
libraryDependencies ++= Seq(
Dependencies.Libraries.jodaConvert,
Expand Down
11 changes: 11 additions & 0 deletions project/BuildSettings.scala
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ import bintray.BintrayKeys._
// Scalafmt
import org.scalafmt.sbt.ScalafmtPlugin.autoImport._

// Docs
import sbtunidoc.ScalaUnidocPlugin.autoImport._
import com.typesafe.sbt.site.SitePlugin.autoImport._
import com.typesafe.sbt.SbtGit.GitKeys._

object BuildSettings {

// Basic settings for our app
Expand Down Expand Up @@ -78,4 +83,10 @@ object BuildSettings {
lazy val formattingSettings = Seq(
scalafmtOnCompile := true
)

lazy val docsSettings = Seq(
addMappingsToSiteDir(mappings in (ScalaUnidoc, packageDoc), siteSubdirName in ScalaUnidoc),
gitRemoteRepo := "https://github.com/snowplow/scala-forex.git",
siteSubdirName := ""
)
}
4 changes: 3 additions & 1 deletion project/plugins.sbt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
addSbtPlugin("org.foundweekends" % "sbt-bintray" % "0.5.4")

addSbtPlugin("com.geirsson" % "sbt-scalafmt" % "1.5.1")
addSbtPlugin("com.typesafe.sbt" % "sbt-site" % "1.3.2")
addSbtPlugin("com.eed3si9n" % "sbt-unidoc" % "0.4.2")
addSbtPlugin("com.typesafe.sbt" % "sbt-ghpages" % "0.6.2")

0 comments on commit 2584cae

Please sign in to comment.