api / org.gradle.api.tasks.javadoc / Groovydoc

Groovydoc

@CacheableTask open class Groovydoc : SourceTask

Generates HTML API documentation for Groovy source, and optionally, Java source.

This task uses Groovy's Groovydoc tool to generate the API documentation. Please note that the Groovydoc tool has some limitations at the moment. The version of the Groovydoc that is used, is the one from the Groovy dependency defined in the build script.

Types

Link

open class Link : Serializable

A Link class represent a link between groovydoc/javadoc output and url.

Constructors

<init>

Groovydoc()

Functions

getAntGroovydoc

open fun getAntGroovydoc(): AntGroovydoc

getClasspath

open fun getClasspath(): FileCollection

Returns the classpath used to locate classes referenced by the documented sources.

getDestinationDir

open fun getDestinationDir(): File

Returns the directory to generate the documentation into.

getDocTitle

open fun getDocTitle(): String

Returns the title for the package index(first) page. Set to null when there is no document title.

getFooter

open fun getFooter(): String

Returns the HTML footer for each page. Set to null when there is no footer.

getGroovyClasspath

open fun getGroovyClasspath(): FileCollection

Returns the classpath containing the Groovy library to be used.

getHeader

open fun getHeader(): String

Returns the HTML header for each page. Set to null when there is no header.

getLinks

open fun getLinks(): MutableSet<Link>

Returns the links to groovydoc/javadoc output at the given URL.

getOverviewText

open fun getOverviewText(): TextResource

Returns a HTML text to be used for overview documentation. Set to null when there is no overview text.

getSource

open fun getSource(): FileTree

{@inheritDoc}

getWindowTitle

open fun getWindowTitle(): String

Returns the browser window title for the documentation. Set to null when there is no window title.

isIncludePrivate

open fun isIncludePrivate(): Boolean

Returns whether to include all classes and members (i.e. including private ones).

isNoTimestamp

open fun isNoTimestamp(): Boolean

Returns whether to include timestamp within hidden comment in generated HTML (Groovy >= 2.4.6).

isNoVersionStamp

open fun isNoVersionStamp(): Boolean

Returns whether to include version stamp within hidden comment in generated HTML (Groovy >= 2.4.6).

isUse

open fun isUse(): Boolean

Returns whether to create class and package usage pages.

link

open fun link(url: String, vararg packages: String): Unit

Add links to groovydoc/javadoc output at the given URL.

setAntGroovydoc

open fun setAntGroovydoc(antGroovydoc: AntGroovydoc): Unit

setClasspath

open fun setClasspath(classpath: FileCollection): Unit

Sets the classpath used to locate classes referenced by the documented sources.

setDestinationDir

open fun setDestinationDir(destinationDir: File): Unit

Sets the directory to generate the documentation into.

setDocTitle

open fun setDocTitle(docTitle: String): Unit

Sets title for the package index(first) page (optional).

setFooter

open fun setFooter(footer: String): Unit

Sets footer text for each page (optional).

setGroovyClasspath

open fun setGroovyClasspath(groovyClasspath: FileCollection): Unit

Sets the classpath containing the Groovy library to be used.

setHeader

open fun setHeader(header: String): Unit

Sets header text for each page (optional).

setIncludePrivate

open fun setIncludePrivate(includePrivate: Boolean): Unit

Sets whether to include all classes and members (i.e. including private ones) if set to true.

setLinks

open fun setLinks(links: MutableSet<Link>): Unit

Sets links to groovydoc/javadoc output at the given URL.

setNoTimestamp

open fun setNoTimestamp(noTimestamp: Boolean): Unit

Sets whether to include timestamp within hidden comment in generated HTML (Groovy >= 2.4.6).

setNoVersionStamp

open fun setNoVersionStamp(noVersionStamp: Boolean): Unit

Sets whether to include version stamp within hidden comment in generated HTML (Groovy >= 2.4.6).

setOverviewText

open fun setOverviewText(overviewText: TextResource): Unit

Sets a HTML text to be used for overview documentation (optional).

Example: overviewText = resources.text.fromFile("/overview.html")

setUse

open fun setUse(use: Boolean): Unit

Sets whether to create class and package usage pages.

setWindowTitle

open fun setWindowTitle(windowTitle: String): Unit

Sets the browser window title for the documentation.

Inherited Functions

exclude

open fun exclude(vararg excludes: String): SourceTask
open fun exclude(excludes: MutableIterable<String>): SourceTask
open fun exclude(excludeSpec: Spec<FileTreeElement>): SourceTask
open fun exclude(excludeSpec: Closure<Any>): SourceTask

{@inheritDoc}

getExcludes

open fun getExcludes(): MutableSet<String>

{@inheritDoc}

getIncludes

open fun getIncludes(): MutableSet<String>

{@inheritDoc}

include

open fun include(vararg includes: String): SourceTask
open fun include(includes: MutableIterable<String>): SourceTask
open fun include(includeSpec: Spec<FileTreeElement>): SourceTask
open fun include(includeSpec: Closure<Any>): SourceTask

{@inheritDoc}

setExcludes

open fun setExcludes(excludes: MutableIterable<String>): SourceTask

{@inheritDoc}

setIncludes

open fun setIncludes(includes: MutableIterable<String>): SourceTask

{@inheritDoc}

setSource

open fun setSource(source: FileTree): Unit

Sets the source for this task.

open fun setSource(source: Any): Unit

Sets the source for this task. The given source object is evaluated as per org.gradle.api.Project#files(Object...).

source

open fun source(vararg sources: Any): SourceTask

Adds some source to this task. The given source objects will be evaluated as per org.gradle.api.Project#files(Object...).