Package: org.gradle.api.tasks.javadoc

## [Java] Class Groovydoc

- org.gradle.api.tasks.javadoc.Groovydoc

- 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.

- - ### Nested Class Summary

    Nested classes
    Modifiers | Name | Description
    --- | --- | ---
    `static class` | `Groovydoc.Link` | A Link class represent a link between groovydoc/javadoc output and url.

  - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class SourceTask` | `source`
    `class org.gradle.api.internal.ConventionTask` | `TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION`

  - ### Constructor Summary

    Constructors
    Constructor and description
    `Groovydoc ()`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `protected void` | `generate()`
    `AntGroovydoc` | `getAntGroovydoc()`
    `FileCollection` | `getClasspath()` Returns the classpath used to locate classes referenced by the documented sources.
    `File` | `getDestinationDir()` Returns the directory to generate the documentation into.
    `String` | `getDocTitle()` Returns the title for the package index(first) page.
    `String` | `getFooter()` Returns the HTML footer for each page.
    `FileCollection` | `getGroovyClasspath()` Returns the classpath containing the Groovy library to be used.
    `String` | `getHeader()` Returns the HTML header for each page.
    `Set<Link>` | `getLinks()` Returns the links to groovydoc/javadoc output at the given URL.
    `String` | `getOverview()` Returns a HTML file to be used for overview documentation.
    `TextResource` | `getOverviewText()` Returns a HTML text to be used for overview documentation.
    `String` | `getWindowTitle()` Returns the browser window title for the documentation.
    `boolean` | `isIncludePrivate()` Returns whether to include all classes and members (i.e. including private ones).
    `boolean` | `isNoTimestamp()` Returns whether to include timestamp within hidden comment in generated HTML (Groovy >= 2.4.6).
    `boolean` | `isNoVersionStamp()` Returns whether to include version stamp within hidden comment in generated HTML (Groovy >= 2.4.6).
    `boolean` | `isUse()` Returns whether to create class and package usage pages.
    `void` | `link(String url, String... packages)` Add links to groovydoc/javadoc output at the given URL.
    `void` | `setAntGroovydoc(AntGroovydoc antGroovydoc)`
    `void` | `setClasspath(FileCollection classpath)` Sets the classpath used to locate classes referenced by the documented sources.
    `void` | `setDestinationDir(File destinationDir)` Sets the directory to generate the documentation into.
    `void` | `setDocTitle(String docTitle)` Sets title for the package index(first) page (optional).
    `void` | `setFooter(String footer)` Sets footer text for each page (optional).
    `void` | `setGroovyClasspath(FileCollection groovyClasspath)` Sets the classpath containing the Groovy library to be used.
    `void` | `setHeader(String header)` Sets header text for each page (optional).
    `void` | `setIncludePrivate(boolean includePrivate)` Sets whether to include all classes and members (i.e. including private ones) if set to true.
    `void` | `setLinks(Set<Link> links)` Sets links to groovydoc/javadoc output at the given URL.
    `void` | `setNoTimestamp(boolean noTimestamp)` Sets whether to include timestamp within hidden comment in generated HTML (Groovy >= 2.4.6).
    `void` | `setNoVersionStamp(boolean noVersionStamp)` Sets whether to include version stamp within hidden comment in generated HTML (Groovy >= 2.4.6).
    `void` | `setOverview(String overview)` Sets a HTML file to be used for overview documentation (optional).
    `void` | `setOverviewText(TextResource overviewText)` Sets a HTML text to be used for overview documentation (optional).
    `void` | `setUse(boolean use)` Sets whether to create class and package usage pages.
    `void` | `setWindowTitle(String windowTitle)` Sets the browser window title for the documentation.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class SourceTask` | `exclude, exclude, exclude, exclude, getExcludes, getIncludes, getPatternSetFactory, getSource, include, include, include, include, setExcludes, setIncludes, setSource, source`
    `class org.gradle.api.internal.ConventionTask` | `org.gradle.api.internal.ConventionTask#conventionMapping(java.lang.String, groovy.lang.Closure), org.gradle.api.internal.ConventionTask#conventionMapping(java.lang.String, java.util.concurrent.Callable), org.gradle.api.internal.ConventionTask#getConventionMapping(), org.gradle.api.internal.ConventionTask#setProperty(java.lang.String, java.lang.Object), org.gradle.api.internal.ConventionTask#toString(), org.gradle.api.internal.ConventionTask#compareTo(org.gradle.api.Task), org.gradle.api.internal.ConventionTask#compareTo(java.lang.Object), org.gradle.api.internal.ConventionTask#getName(), org.gradle.api.internal.ConventionTask#getActions(), org.gradle.api.internal.ConventionTask#setName(java.lang.String), org.gradle.api.internal.ConventionTask#getState(), org.gradle.api.internal.ConventionTask#getState(), org.gradle.api.internal.ConventionTask#getLogger(), org.gradle.api.internal.ConventionTask#getPath(), org.gradle.api.internal.ConventionTask#getExtensions(), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#configure(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#getDescription(), org.gradle.api.internal.ConventionTask#property(java.lang.String), org.gradle.api.internal.ConventionTask#getStandardOutputCapture(), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#getOutputs(), org.gradle.api.internal.ConventionTask#deleteAllActions(), org.gradle.api.internal.ConventionTask#getEnabled(), org.gradle.api.internal.ConventionTask#getAnt(), org.gradle.api.internal.ConventionTask#getLogging(), org.gradle.api.internal.ConventionTask#getLogging(), org.gradle.api.internal.ConventionTask#hasProperty(java.lang.String), org.gradle.api.internal.ConventionTask#getConvention(), org.gradle.api.internal.ConventionTask#setDescription(java.lang.String), org.gradle.api.internal.ConventionTask#getGroup(), org.gradle.api.internal.ConventionTask#setGroup(java.lang.String), org.gradle.api.internal.ConventionTask#dependsOnTaskDidWork(), org.gradle.api.internal.ConventionTask#getInputs(), org.gradle.api.internal.ConventionTask#getTemporaryDir(), org.gradle.api.internal.ConventionTask#mustRunAfter([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#setMustRunAfter(java.lang.Iterable), org.gradle.api.internal.ConventionTask#getMustRunAfter(), org.gradle.api.internal.ConventionTask#finalizedBy([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#setFinalizedBy(java.lang.Iterable), org.gradle.api.internal.ConventionTask#getFinalizedBy(), org.gradle.api.internal.ConventionTask#shouldRunAfter([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#setShouldRunAfter(java.lang.Iterable), org.gradle.api.internal.ConventionTask#getShouldRunAfter(), org.gradle.api.internal.ConventionTask#getProject(), org.gradle.api.internal.ConventionTask#setActions(java.util.List), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#getTaskDependencies(), org.gradle.api.internal.ConventionTask#getDependsOn(), org.gradle.api.internal.ConventionTask#setDependsOn(java.lang.Iterable), org.gradle.api.internal.ConventionTask#dependsOn([Ljava.lang.Object;), org.gradle.api.internal.ConventionTask#onlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#onlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#setOnlyIf(org.gradle.api.specs.Spec), org.gradle.api.internal.ConventionTask#setOnlyIf(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#setDidWork(boolean), org.gradle.api.internal.ConventionTask#getDidWork(), org.gradle.api.internal.ConventionTask#doFirst(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#doFirst(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#doLast(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#doLast(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#getAsDynamicObject(), org.gradle.api.internal.ConventionTask#prependParallelSafeAction(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#injectIntoNewInstance(org.gradle.api.internal.project.ProjectInternal, java.lang.String, java.lang.Class, java.util.concurrent.Callable), org.gradle.api.internal.ConventionTask#getTaskActions(), org.gradle.api.internal.ConventionTask#getOnlyIf(), org.gradle.api.internal.ConventionTask#getImpliesSubProjects(), org.gradle.api.internal.ConventionTask#setImpliesSubProjects(boolean), org.gradle.api.internal.ConventionTask#getExecuter(), org.gradle.api.internal.ConventionTask#setExecuter(org.gradle.api.internal.tasks.TaskExecuter), org.gradle.api.internal.ConventionTask#getTemporaryDirFactory(), org.gradle.api.internal.ConventionTask#addValidator(org.gradle.api.internal.tasks.execution.TaskValidator), org.gradle.api.internal.ConventionTask#getValidators(), org.gradle.api.internal.ConventionTask#appendParallelSafeAction(org.gradle.api.Action), org.gradle.api.internal.ConventionTask#isHasCustomActions(), org.gradle.api.internal.ConventionTask#execute(), org.gradle.api.internal.ConventionTask#isEnabled(), org.gradle.api.internal.ConventionTask#setEnabled(boolean), org.gradle.api.internal.ConventionTask#leftShift(groovy.lang.Closure), org.gradle.api.internal.ConventionTask#setProject(org.gradle.api.Project), org.gradle.api.internal.ConventionTask#wait(long, int), org.gradle.api.internal.ConventionTask#wait(long), org.gradle.api.internal.ConventionTask#wait(), org.gradle.api.internal.ConventionTask#equals(java.lang.Object), org.gradle.api.internal.ConventionTask#hashCode(), org.gradle.api.internal.ConventionTask#getClass(), org.gradle.api.internal.ConventionTask#notify(), org.gradle.api.internal.ConventionTask#notifyAll()`

- - ### Constructor Detail

    - #### public Groovydoc()

  - ### Method Detail

    - #### @TaskAction protected void generate()

    - #### public AntGroovydoc getAntGroovydoc()

    - #### @InputFiles public FileCollection getClasspath()

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

      Returns:
        The classpath used to locate classes referenced by the documented sources

    - #### @OutputDirectory public File getDestinationDir()

      Returns the directory to generate the documentation into.

      Returns:
        The directory to generate the documentation into

    - #### @Input @Optional public String getDocTitle()

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

    - #### @Input @Optional public String getFooter()

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

    - #### @InputFiles public FileCollection getGroovyClasspath()

      Returns the classpath containing the Groovy library to be used.

      Returns:
        The classpath containing the Groovy library to be used

    - #### @Input @Optional public String getHeader()

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

    - #### @Input public Set<Link> getLinks()

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

    - #### @Deprecated public String getOverview()

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

      deprecated:
        please use getOverviewText() instead

    - #### @Nested @Optional public TextResource getOverviewText()

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

    - #### @Input @Optional public String getWindowTitle()

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

    - #### @Input public boolean isIncludePrivate()

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

    - #### @Input public boolean isNoTimestamp()

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

    - #### @Input public boolean isNoVersionStamp()

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

    - #### @Input public boolean isUse()

      Returns whether to create class and package usage pages.

    - #### public void link(String url, String... packages)

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

      Parameters:
        `url` - Base URL of external site
        `packages` - list of package prefixes

    - #### public void setAntGroovydoc(AntGroovydoc antGroovydoc)

    - #### public void setClasspath(FileCollection classpath)

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

    - #### public void setDestinationDir(File destinationDir)

      Sets the directory to generate the documentation into.

    - #### public void setDocTitle(String docTitle)

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

      Parameters:
        `docTitle` - the docTitle as HTML

    - #### public void setFooter(String footer)

      Sets footer text for each page (optional).

      Parameters:
        `footer` - the footer as HTML

    - #### public void setGroovyClasspath(FileCollection groovyClasspath)

      Sets the classpath containing the Groovy library to be used.

    - #### public void setHeader(String header)

      Sets header text for each page (optional).

      Parameters:
        `header` - the header as HTML

    - #### public void setIncludePrivate(boolean includePrivate)

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

    - #### public void setLinks(Set<Link> links)

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

      Parameters:
        `links` - The links to set
      See Also:
        link(String, String...)

    - #### public void setNoTimestamp(boolean noTimestamp)

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

    - #### public void setNoVersionStamp(boolean noVersionStamp)

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

    - #### @Deprecated public void setOverview(String overview)

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

      deprecated:
        please use setOverviewText(TextResource) instead

    - #### public void setOverviewText(TextResource overviewText)

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

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

    - #### public void setUse(boolean use)

      Sets whether to create class and package usage pages.

    - #### public void setWindowTitle(String windowTitle)

      Sets the browser window title for the documentation.

      Parameters:
        `windowTitle` - A text for the windows title