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:
  `Comparable<Task>`, `org.gradle.api.internal.DynamicObjectAware`, `org.gradle.api.internal.IConventionAware`, `org.gradle.api.internal.TaskInternal`, `Named`, `ExtensionAware`, `Task`, `PatternFilterable`, `Configurable<Task>`

@CacheableTask public abstract 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.Named

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

  Modifier and Type
  Method
  Description
  `protected void`
  `generate()`
  `abstract Property<GroovydocAccess>`
  `getAccess()`
  The most restrictive access level to include in the Groovydoc.
  `abstract ConfigurableFileCollection`
  `getClasspath()`
  The classpath used to locate classes referenced by the documented sources.
  `protected abstract org.gradle.internal.file.Deleter`
  `getDeleter()`
  `abstract DirectoryProperty`
  `getDestinationDir()`
  Returns the directory to generate the documentation into.
  `abstract Property<String>`
  `getDocTitle()`
  Returns the title for the package index(first) page.
  `abstract Property<String>`
  `getFooter()`
  Returns the HTML footer for each page.
  `abstract ConfigurableFileCollection`
  `getGroovyClasspath()`
  Returns the classpath containing the Groovy library to be used.
  `abstract Property<String>`
  `getHeader()`
  Returns the HTML header for each page.
  `abstract Property<Boolean>`
  `getIncludeAuthor()`
  Whether to include author paragraphs.
  `abstract Property<Boolean>`
  `getIncludeMainForScripts()`
  Whether to include main method for scripts.
  `Property<Boolean>`
  `getIsNoTimestamp()`
  `Property<Boolean>`
  `getIsNoVersionStamp()`
  `Property<Boolean>`
  `getIsUse()`
  `abstract SetProperty<Groovydoc.Link>`
  `getLinks()`
  Returns the links to groovydoc/javadoc output at the given URL.
  `abstract Property<Boolean>`
  `getNoTimestamp()`
  Returns whether to include timestamp within hidden comment in generated HTML (Groovy >= 2.4.6).
  `abstract Property<Boolean>`
  `getNoVersionStamp()`
  Returns whether to include version stamp within hidden comment in generated HTML (Groovy >= 2.4.6).
  `@Nullable TextResource`
  `getOverviewText()`
  Returns a HTML text to be used for overview documentation.
  `abstract Property<Boolean>`
  `getProcessScripts()`
  Whether to process scripts.
  `FileTree`
  `getSource()`
  Returns the source for this task, after the include and exclude patterns have been applied.
  `abstract Property<Boolean>`
  `getUse()`
  Returns whether to create class and package usage pages.
  `abstract Property<String>`
  `getWindowTitle()`
  Returns the browser window title for the documentation.
  `protected abstract WorkerExecutor`
  `getWorkerExecutor()`
  `void`
  `link(String url, String... packages)`
  Add links to groovydoc/javadoc output at the given URL.
  `void`
  `setOverviewText(@Nullable TextResource overviewText)`
  Sets a HTML text to be used for overview documentation (optional).

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

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

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

  `conventionMapping, conventionMapping, getConventionMapping`

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

  `compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService`

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

  `acceptServiceReferences, appendParallelSafeAction, doNotTrackState, doNotTrackStateIf, getAsDynamicObject, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonsNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, restoreOnlyIf, restoreTaskActions, setImpliesSubProjects`

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

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

  ### Methods inherited from interface org.gradle.api.Task

  `doNotTrackState, notCompatibleWithConfigurationCache`

- ## Constructor Details

  - ### Groovydoc

    public Groovydoc()

- ## Method Details

  - ### getWorkerExecutor

    @Inject protected abstract WorkerExecutor getWorkerExecutor()

  - ### 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 abstract DirectoryProperty getDestinationDir()
    Returns the directory to generate the documentation into.
    Returns:
      The directory to generate the documentation into

  - ### getGroovyClasspath

    @Classpath public abstract ConfigurableFileCollection getGroovyClasspath()
    Returns the classpath containing the Groovy library to be used.
    Returns:
      The classpath containing the Groovy library to be used

  - ### getClasspath

    @Classpath public abstract ConfigurableFileCollection getClasspath()
    The classpath used to locate classes referenced by the documented sources.

  - ### getUse

    @Input public abstract Property<Boolean> getUse()
    Returns whether to create class and package usage pages.

  - ### getIsUse

    @Internal public Property<Boolean> getIsUse()

  - ### getNoTimestamp

    @Input public abstract Property<Boolean> getNoTimestamp()
    Returns whether to include timestamp within hidden comment in generated HTML (Groovy >= 2.4.6).

  - ### getIsNoTimestamp

    @Internal public Property<Boolean> getIsNoTimestamp()

  - ### getNoVersionStamp

    @Input public abstract Property<Boolean> getNoVersionStamp()
    Returns whether to include version stamp within hidden comment in generated HTML (Groovy >= 2.4.6).

  - ### getIsNoVersionStamp

    @Internal public Property<Boolean> getIsNoVersionStamp()

  - ### getWindowTitle

    @Optional @Input public abstract Property<String> getWindowTitle()
    Returns the browser window title for the documentation. Set to `null` when there is no window title.

  - ### getDocTitle

    @Optional @Input public abstract Property<String> getDocTitle()
    Returns the title for the package index(first) page. Set to `null` when there is no document title.

  - ### getHeader

    @Optional @Input public abstract Property<String> getHeader()
    Returns the HTML header for each page. Set to `null` when there is no header.

  - ### getFooter

    @Optional @Input public abstract Property<String> getFooter()
    Returns the HTML footer for each page. Set to `null` when there is no footer.

  - ### getOverviewText

    @Optional public @Nullable 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")`

  - ### getAccess

    @Input public abstract Property<GroovydocAccess> getAccess()
    The most restrictive access level to include in the Groovydoc.

    For example, to include classes and members with package, protected, and public access, use `GroovydocAccess.PACKAGE`.

    Returns:
      the access property
    Since:
      7.5

  - ### getIncludeAuthor

    @Input public abstract Property<Boolean> getIncludeAuthor()
    Whether to include author paragraphs.
    Since:
      7.5

  - ### getProcessScripts

    @Input public abstract Property<Boolean> getProcessScripts()
    Whether to process scripts.
    Since:
      7.5

  - ### getIncludeMainForScripts

    @Input public abstract Property<Boolean> getIncludeMainForScripts()
    Whether to include main method for scripts.
    Since:
      7.5

  - ### getLinks

    @Input public abstract SetProperty<Groovydoc.Link> getLinks()
    Returns the links to groovydoc/javadoc output at the given URL.

  - ### link

    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

  - ### getDeleter

    @Inject protected abstract org.gradle.internal.file.Deleter getDeleter()