Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.tasks.javadoc
[Java] Class Groovydoc

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

    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 severe limitations at the moment (for example no doc for properties comments). The version of the Groovydoc that is used, is the one from the Groovy defined in the build script. Please note also, that the Groovydoc tool prints to System.out for many of its statements and does circumvents our logging currently.

Authors:
  Hans Dockter

Nested Class Summary
`static class` | `Groovydoc.Link` A Link class represent a link between groovydoc/javadoc output and url.

Constructor Summary
`Groovydoc()`

Method Summary
`protected void` | `generate()`
`AntGroovydoc` | `getAntGroovydoc()`
`FileCollection` | `getClasspath()` Returns the classpath containing the Groovy library to be used.
`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 used to locate classes referenced by the documented sources.
`java.lang.String` | `getHeader()` Returns the html header for each page.
`java.util.Set` | `getLinks()` Returns the links to groovydoc/javadoc output at the given URL.
`java.lang.String` | `getOverview()` Returns a html file to be used for overview documentation.
`java.lang.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` | `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(AntGroovydoc antGroovydoc)`
`void` | `setClasspath(FileCollection classpath)` Sets the classpath containing the Groovy library to be used.
`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 used to locate classes referenced by the documented sources.
`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. including private ones) if set to true.
`void` | `setLinks(java.util.Set links)` Sets links to groovydoc/javadoc output at the given URL.
`void` | `setOverview(java.lang.String overview)` Sets a html file 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 SourceTask
exclude, exclude, exclude, exclude, getDefaultSource, getExcludes, getIncludes, getSource, include, include, include, include, setExcludes, setIncludes, setSource, source

Constructor Detail

### Groovydoc

    public Groovydoc()

Method Detail

### generate

    @TaskAction
    protected void generate()

### getAntGroovydoc

    public AntGroovydoc getAntGroovydoc()

### getClasspath

    @InputFiles
    public FileCollection getClasspath()

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

### getDestinationDir

    @OutputDirectory
    public java.io.File getDestinationDir()

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

### getDocTitle

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

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

### getFooter

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

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

### getGroovyClasspath

    @InputFiles
    public FileCollection getGroovyClasspath()

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

### getHeader

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

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

### getLinks

    @Input
    public java.util.Set getLinks()

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

### getOverview

    public java.lang.String getOverview()

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

### getWindowTitle

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

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

### isIncludePrivate

    @Input
    public boolean isIncludePrivate()

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

### isUse

    @Input
    public boolean isUse()

  Returns whether to create class and package usage pages.

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

### setAntGroovydoc

    public void setAntGroovydoc(AntGroovydoc antGroovydoc)

### setClasspath

    public void setClasspath(FileCollection classpath)

  Sets the classpath containing the Groovy library to be used.

### setDestinationDir

    public void setDestinationDir(java.io.File destinationDir)

  Sets the directory to generate the documentation into.

### setDocTitle

    public void setDocTitle(java.lang.String docTitle)

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

### setFooter

    public void setFooter(java.lang.String footer)

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

### setGroovyClasspath

    public void setGroovyClasspath(FileCollection groovyClasspath)

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

### setHeader

    public void setHeader(java.lang.String header)

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

### setIncludePrivate

    public void setIncludePrivate(boolean includePrivate)

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

### setLinks

    public void setLinks(java.util.Set links)

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

### setOverview

    public void setOverview(java.lang.String overview)

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

### setUse

    public void setUse(boolean use)

  Sets whether to create class and package usage pages.

### setWindowTitle

    public void setWindowTitle(java.lang.String windowTitle)

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

Groovy Documentation