diff options
| author | Schuyler Eldridge | 2019-02-18 12:01:46 -0500 |
|---|---|---|
| committer | Schuyler Eldridge | 2019-05-12 15:27:48 -0400 |
| commit | a9139df75a52369d88c266c8c927841b8a61352a (patch) | |
| tree | bba62c94494542e9034917d53e03822dc4e07d7e /build.sbt | |
| parent | e1aa5f3f5c0cdeb204047c3ca50801d9f7ea25f1 (diff) | |
Add sources to Scaladoc
This uses the `-sourcepath` and `-doc-source-url` options when
generating Scaladoc in add a link to the Chisel3 GitHub source file.
This is setup to link to master if a "-SNAPSHOT" version is used. If
the documentation is built for a non-snapshot version, then this will
use the "v$version" branch on GitHub.
Signed-off-by: Schuyler Eldridge <schuyler.eldridge@ibm.com>
Diffstat (limited to 'build.sbt')
| -rw-r--r-- | build.sbt | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -177,7 +177,18 @@ lazy val chisel = (project in file(".")). "-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/chisel3/tree/$branch/€{FILE_PATH}.scala" + } ), // Include macro classes, resources, and sources main JAR since we don't create subproject JARs. mappings in (Compile, packageBin) ++= (mappings in (coreMacros, Compile, packageBin)).value, |
