aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSchuyler Eldridge2019-02-22 18:59:52 -0500
committerSchuyler Eldridge2019-02-25 00:16:25 -0500
commit6de0075d799e59e5d23463b3848e848b0912fbc4 (patch)
treebba1fd30561a6b6e4bc99cfa324b1dea94bc6866
parent5decb4079814be1fef10a02bf5518ec4e29f37dd (diff)
Add GitHub source links to Scaladoc
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
-rw-r--r--build.sbt13
1 files changed, 12 insertions, 1 deletions
diff --git a/build.sbt b/build.sbt
index 216ecd19..90fd4b07 100644
--- a/build.sbt
+++ b/build.sbt
@@ -159,7 +159,18 @@ scalacOptions in Compile in doc ++= Seq(
"-diagrams-max-classes", "25",
"-doc-version", version.value,
"-doc-title", name.value,
- "-doc-root-content", baseDirectory.value+"/root-doc.txt"
+ "-doc-root-content", baseDirectory.value+"/root-doc.txt",
+ "-sourcepath", (baseDirectory in ThisBuild).value.toString,
+ "-doc-source-url",
+ {
+ val branch =
+ if (version.value.endsWith("-SNAPSHOT")) {
+ "master"
+ } else {
+ s"v${version.value}"
+ }
+ s"https://github.com/freechipsproject/firrtl/tree/$branch€{FILE_PATH}.scala"
+ }
) ++ scalacOptionsVersion(scalaVersion.value)
fork := true