Add Scaladoc title and version number (#502)

* Add version and name to Scaladoc

* Compile website on Travis as part of CI
This commit is contained in:
Torkel Rogstad 2019-06-07 14:23:32 +02:00 committed by Chris Stewart
parent 0b885cd658
commit ed0e952336
2 changed files with 19 additions and 9 deletions

View file

@ -60,6 +60,9 @@ script: sbt ++$TRAVIS_SCALA_VERSION coverage test &&
jobs:
include:
- stage: test
name: Compile website
script: sbt docs/mdoc
# run ci-release only if previous stages passed
- stage: release
name: Publish library

View file

@ -51,6 +51,22 @@ lazy val commonSettings = List(
url("https://twitter.com/Chris_Stewart_5")
)
),
////
// scaladoc settings
Compile / doc / scalacOptions := List(
"-doc-title",
"Bitcoin-S",
"-doc-version",
version.value,
),
// Set apiURL to define the base URL for the Scaladocs for our library.
// This will enable clients of our library to automatically link against
// the API documentation using autoAPIMappings.
apiURL := homepage.value.map(_.toString + "/api").map(url(_)),
// scaladoc settings end
////
scalacOptions in Compile := compilerOpts,
scalacOptions in Test := testCompilerOpts,
//show full stack trace of failed tests
@ -120,15 +136,6 @@ lazy val bitcoins = project
.settings(libraryDependencies ++= Deps.root)
.enablePlugins(ScalaUnidocPlugin, GitVersioning)
.settings(
// scaladoc settings
// TODO this is not working properly
inTask(unidoc)(
scalacOptions in Compile ++= List(
"-doc-title",
"Bitcoin-S",
"-doc-version",
version.value
)),
// we modify the unidoc task to move the generated Scaladocs into the
// website directory afterwards
Compile / unidoc := {