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.
Modifier and Type | Class and Description |
---|---|
static class |
Groovydoc.Link
A Link class represent a link between groovydoc/javadoc output and url.
|
Task.Namer
TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
Constructor and Description |
---|
Groovydoc() |
Modifier and Type | Method and Description |
---|---|
protected void |
generate() |
org.gradle.api.tasks.javadoc.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<Groovydoc.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.
|
String |
getWindowTitle()
Returns the browser window title for the documentation.
|
boolean |
isIncludePrivate()
Returns whether to include all classes and members (i.e.
|
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(org.gradle.api.tasks.javadoc.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.
|
void |
setLinks(Set<Groovydoc.Link> links)
Sets links to groovydoc/javadoc output at the given URL.
|
void |
setOverview(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(String windowTitle)
Sets the browser window title for the documentation.
|
exclude, exclude, exclude, exclude, getDefaultSource, getExcludes, getIncludes, getSource, include, include, include, include, setExcludes, setIncludes, setSource, source
conventionMapping, conventionMapping, getConventionMapping
addValidator, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, executeWithoutThrowingTaskFailure, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getStateInternal, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, leftShift, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setMustRunAfter, setName, setOnlyIf, setOnlyIf, setProject, setProperty, setShouldRunAfter, shouldRunAfter, toString
protected void generate()
@OutputDirectory public File getDestinationDir()
public void setDestinationDir(File destinationDir)
@InputFiles public FileCollection getGroovyClasspath()
public void setGroovyClasspath(FileCollection groovyClasspath)
@InputFiles public FileCollection getClasspath()
public void setClasspath(FileCollection classpath)
public org.gradle.api.tasks.javadoc.AntGroovydoc getAntGroovydoc()
public void setAntGroovydoc(org.gradle.api.tasks.javadoc.AntGroovydoc antGroovydoc)
@Input public boolean isUse()
public void setUse(boolean use)
@Input @Optional public String getWindowTitle()
null
when there is no window title.public void setWindowTitle(String windowTitle)
windowTitle
- A text for the windows title@Input @Optional public String getDocTitle()
null
when there is no document title.public void setDocTitle(String docTitle)
docTitle
- the docTitle as HTML@Input @Optional public String getHeader()
null
when there is no header.public void setHeader(String header)
header
- the header as HTML@Input @Optional public String getFooter()
null
when there is no footer.public void setFooter(String footer)
footer
- the footer as HTMLpublic String getOverview()
null
when there is no overview file.public void setOverview(String overview)
@Input public boolean isIncludePrivate()
public void setIncludePrivate(boolean includePrivate)
@Input public Set<Groovydoc.Link> getLinks()
public void setLinks(Set<Groovydoc.Link> links)
links
- The links to setlink(String, String...)