Groovydoc (Gradle API 5.0)
Date: 2018-11-26

Package org.gradle.api.tasks.javadoc

## Class Groovydoc

- java.lang.Object
- - org.gradle.api.internal.AbstractTask
  - - org.gradle.api.DefaultTask
    - - org.gradle.api.internal.ConventionTask
      - - org.gradle.api.tasks.SourceTask
        - - org.gradle.api.tasks.javadoc.Groovydoc

- All Implemented Interfaces:
    `PatternFilterable`

      @CacheableTask
      public class Groovydoc
      extends 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.

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `Groovydoc.Link` | A Link class represent a link between groovydoc/javadoc output and url.

    - ### Nested classes/interfaces inherited from interface org.gradle.api.Task

      `Task.Namer`

  - ### Field Summary

    - ### Fields inherited from interface org.gradle.api.Task

      `TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE`

  - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `Groovydoc​()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `protected void` | `generate​()` |
    `org.gradle.api.internal.tasks.AntGroovydoc` | `getAntGroovydoc​()` |
    `FileCollection` | `getClasspath​()` | Returns the classpath used to locate classes referenced by the documented sources.
    `java.io.File` | `getDestinationDir​()` | Returns the directory to generate the documentation into.
    `java.lang.String` | `getDocTitle​()` | Returns the title for the package index(first) page.
    `java.lang.String` | `getFooter​()` | Returns the HTML footer for each page.
    `FileCollection` | `getGroovyClasspath​()` | Returns the classpath containing the Groovy library to be used.
    `java.lang.String` | `getHeader​()` | Returns the HTML header for each page.
    `java.util.Set<Groovydoc.Link>` | `getLinks​()` | Returns the links to groovydoc/javadoc output at the given URL.
    `TextResource` | `getOverviewText​()` | Returns a HTML text to be used for overview documentation.
    `FileTree` | `getSource​()` | Returns the source for this task, after the include and exclude patterns have been applied.
    `java.lang.String` | `getWindowTitle​()` | Returns the browser window title for the documentation.
    `boolean` | `isIncludePrivate​()` | Returns whether to include all classes and members (i.e.
    `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​(java.lang.String url, java.lang.String... packages)` | Add links to groovydoc/javadoc output at the given URL.
    `void` | `setAntGroovydoc​(org.gradle.api.internal.tasks.AntGroovydoc antGroovydoc)` |
    `void` | `setClasspath​(FileCollection classpath)` | Sets the classpath used to locate classes referenced by the documented sources.
    `void` | `setDestinationDir​(java.io.File destinationDir)` | Sets the directory to generate the documentation into.
    `void` | `setDocTitle​(java.lang.String docTitle)` | Sets title for the package index(first) page (optional).
    `void` | `setFooter​(java.lang.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​(java.lang.String header)` | Sets header text for each page (optional).
    `void` | `setIncludePrivate​(boolean includePrivate)` | Sets whether to include all classes and members (i.e.
    `void` | `setLinks​(java.util.Set<Groovydoc.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` | `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​(java.lang.String windowTitle)` | Sets the browser window title for the documentation.

    - ### Methods inherited from class org.gradle.api.internal.AbstractTask

      `appendParallelSafeAction, compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTaskIdentity, getTemporaryDir, getTemporaryDirFactory, getTimeout, hasProperty, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, replaceLogger, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString`

    - ### Methods inherited from class org.gradle.api.internal.ConventionTask

      `conventionMapping, conventionMapping, getConventionMapping`

    - ### Methods inherited from class org.gradle.api.DefaultTask

      `newInputDirectory, newInputFile, newOutputDirectory, newOutputFile`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from class org.gradle.api.tasks.SourceTask

      `exclude, exclude, exclude, exclude, getExcludes, getIncludes, getPatternSetFactory, include, include, include, include, setExcludes, setIncludes, setSource, setSource, source`

- - ### Constructor Detail

    - #### Groovydoc

          public Groovydoc​()

  - ### Method Detail

    - #### generate

          protected void generate​()

    - #### getSource

          @PathSensitive(RELATIVE)
          public FileTree getSource​()

      Returns the source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist.

      The `PathSensitivity` for the sources is configured to be `PathSensitivity.ABSOLUTE`. If your sources are less strict, please change it accordingly by overriding this method in your subclass.

      Overrides:
        `getSource` in class `SourceTask`
      Returns:
        The source.

    - #### getDestinationDir

          @OutputDirectory
          public java.io.File getDestinationDir​()

      Returns the directory to generate the documentation into.
      Returns:
        The directory to generate the documentation into

    - #### setDestinationDir

          public void setDestinationDir​(java.io.File destinationDir)

      Sets the directory to generate the documentation into.

    - #### getGroovyClasspath

          @Classpath
          public FileCollection getGroovyClasspath​()

      Returns the classpath containing the Groovy library to be used.
      Returns:
        The classpath containing the Groovy library to be used

    - #### setGroovyClasspath

          public void setGroovyClasspath​(FileCollection groovyClasspath)

      Sets the classpath containing the Groovy library to be used.

    - #### getClasspath

          @Classpath
          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

    - #### setClasspath

          public void setClasspath​(FileCollection classpath)

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

    - #### getAntGroovydoc

          @Internal
          public org.gradle.api.internal.tasks.AntGroovydoc getAntGroovydoc​()

    - #### setAntGroovydoc

          public void setAntGroovydoc​(org.gradle.api.internal.tasks.AntGroovydoc antGroovydoc)

    - #### isUse

          @Input
          public boolean isUse​()

      Returns whether to create class and package usage pages.

    - #### setUse

          public void setUse​(boolean use)

      Sets whether to create class and package usage pages.

    - #### isNoTimestamp

          @Input
          public boolean isNoTimestamp​()

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

    - #### setNoTimestamp

          public void setNoTimestamp​(boolean noTimestamp)

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

    - #### isNoVersionStamp

          @Input
          public boolean isNoVersionStamp​()

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

    - #### setNoVersionStamp

          public void setNoVersionStamp​(boolean noVersionStamp)

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

    - #### getWindowTitle

          @Nullable
          @Optional
          @Input
          public java.lang.String getWindowTitle​()

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

    - #### setWindowTitle

          public void setWindowTitle​(@Nullable
                                     java.lang.String windowTitle)

      Sets the browser window title for the documentation.
      Parameters:
        `windowTitle` - A text for the windows title

    - #### getDocTitle

          @Nullable
          @Optional
          @Input
          public java.lang.String getDocTitle​()

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

    - #### setDocTitle

          public void setDocTitle​(@Nullable
                                  java.lang.String docTitle)

      Sets title for the package index(first) page (optional).
      Parameters:
        `docTitle` - the docTitle as HTML

    - #### getHeader

          @Nullable
          @Optional
          @Input
          public java.lang.String getHeader​()

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

    - #### setHeader

          public void setHeader​(@Nullable
                                java.lang.String header)

      Sets header text for each page (optional).
      Parameters:
        `header` - the header as HTML

    - #### getFooter

          @Nullable
          @Optional
          @Input
          public java.lang.String getFooter​()

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

    - #### setFooter

          public void setFooter​(@Nullable
                                java.lang.String footer)

      Sets footer text for each page (optional).
      Parameters:
        `footer` - the footer as HTML

    - #### getOverviewText

          @Nullable
          @Optional
          public TextResource getOverviewText​()

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

    - #### setOverviewText

          public void setOverviewText​(@Nullable
                                      TextResource overviewText)

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

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

    - #### isIncludePrivate

          @Input
          public boolean isIncludePrivate​()

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

    - #### setIncludePrivate

          public void setIncludePrivate​(boolean includePrivate)

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

    - #### getLinks

          @Input
          public java.util.Set<Groovydoc.Link> getLinks​()

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

    - #### setLinks

          public void setLinks​(java.util.Set<Groovydoc.Link> links)

      Sets links to groovydoc/javadoc output at the given URL.
      Parameters:
        `links` - The links to set
      See Also:
        `link(String, String...)`

    - #### link

          public void link​(java.lang.String url,
                           java.lang.String... packages)

      Add links to groovydoc/javadoc output at the given URL.
      Parameters:
        `url` - Base URL of external site
        `packages` - list of package prefixes