Skip to content

Latest commit

 

History

History
48 lines (40 loc) · 1.36 KB

scala_doc.md

File metadata and controls

48 lines (40 loc) · 1.36 KB

scala_doc

scala_doc(
    name,
    deps,
)

scala_doc generates Scaladoc for sources for targets, including sources from upstream deps. Readily hostable HTML is written to a name.html output folder.

Scaladoc can be somewhat slow to build. In that case, you can tell Bazel to build this target manually, i.e. only when named explicitly and not through wildcards: tags = ["manual"].

Example

scala_doc(
    name = "scala_docs",
    tags = ["manual"],
    deps = [
        ":target1",
        ":target2",
        ":anothertarget",
    ],
    scalacopts = [
        "-Ypartial-unification",
        "-Ywarn-unused-import",
    ],
)

# Use pkg_tar to tarball up
# https://docs.bazel.build/versions/master/be/pkg.html#pkg_tar
pkg_tar(
    name = "scala_docs_archive",
    srcs = [":scala_docs"],
    extension = "tar.gz",
)

Attributes

Attribute name Description
name Name, required
A unique name for this target.
deps List of labels, optional
Labels for which you want to create scaladoc.
scalacopts List of strings, optional
Extra compiler options for this library to be passed to scalac.