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, ExtensionAware, Task, PatternFilterable, org.gradle.util.Configurable<Task>
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 ClassesModifier and TypeClassDescriptionstatic classA Link class represent a link between groovydoc/javadoc output and url.Nested classes/interfaces inherited from interface Task
Task.Namer -
Field Summary
Fields inherited from class SourceTask
sourceFields inherited from interface Task
TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidgenerate()org.gradle.api.internal.tasks.AntGroovydocReturns the classpath used to locate classes referenced by the documented sources.Returns the directory to generate the documentation into.Returns the title for the package index(first) page.Returns the HTML footer for each page.Returns the classpath containing the Groovy library to be used.Returns the HTML header for each page.getLinks()Returns the links to groovydoc/javadoc output at the given URL.Returns a HTML text to be used for overview documentation.Returns the source for this task, after the include and exclude patterns have been applied.Returns the browser window title for the documentation.booleanReturns whether to include all classes and members (i.e.booleanReturns whether to include timestamp within hidden comment in generated HTML (Groovy >= 2.4.6).booleanReturns whether to include version stamp within hidden comment in generated HTML (Groovy >= 2.4.6).booleanisUse()Returns whether to create class and package usage pages.voidAdd links to groovydoc/javadoc output at the given URL.voidsetAntGroovydoc(org.gradle.api.internal.tasks.AntGroovydoc antGroovydoc) voidsetClasspath(FileCollection classpath) Sets the classpath used to locate classes referenced by the documented sources.voidsetDestinationDir(File destinationDir) Sets the directory to generate the documentation into.voidsetDocTitle(String docTitle) Sets title for the package index(first) page (optional).voidSets footer text for each page (optional).voidsetGroovyClasspath(FileCollection groovyClasspath) Sets the classpath containing the Groovy library to be used.voidSets header text for each page (optional).voidsetIncludePrivate(boolean includePrivate) Sets whether to include all classes and members (i.e.voidsetLinks(Set<Groovydoc.Link> links) Sets links to groovydoc/javadoc output at the given URL.voidsetNoTimestamp(boolean noTimestamp) Sets whether to include timestamp within hidden comment in generated HTML (Groovy >= 2.4.6).voidsetNoVersionStamp(boolean noVersionStamp) Sets whether to include version stamp within hidden comment in generated HTML (Groovy >= 2.4.6).voidsetOverviewText(TextResource overviewText) Sets a HTML text to be used for overview documentation (optional).voidsetUse(boolean use) Sets whether to create class and package usage pages.voidsetWindowTitle(String windowTitle) Sets the browser window title for the documentation.Methods inherited from class SourceTask
exclude, exclude, exclude, exclude, getExcludes, getIncludes, getPatternSetFactory, include, include, include, include, setExcludes, setIncludes, setSource, setSource, sourceMethods inherited from class org.gradle.api.internal.ConventionTask
conventionMapping, conventionMapping, getConventionMappingMethods inherited from class DefaultTask
newInputDirectory, newInputFile, newOutputDirectory, newOutputFileMethods inherited from class org.gradle.api.internal.AbstractTask
addValidator, appendParallelSafeAction, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doFirst, doLast, doLast, doLast, execute, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getIdentityPath, getImpliesSubProjects, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, isHasCustomActions, leftShift, mustRunAfter, onlyIf, onlyIf, prependParallelSafeAction, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, toString
-
Constructor Details
-
Groovydoc
public Groovydoc()
-
-
Method Details
-
generate
protected void generate() -
getSource
Returns the source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist.- Overrides:
getSourcein classSourceTask- Returns:
- The source.
-
getDestinationDir
Returns the directory to generate the documentation into.- Returns:
- The directory to generate the documentation into
-
setDestinationDir
Sets the directory to generate the documentation into. -
getGroovyClasspath
Returns the classpath containing the Groovy library to be used.- Returns:
- The classpath containing the Groovy library to be used
-
setGroovyClasspath
Sets the classpath containing the Groovy library to be used. -
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
Sets the classpath used to locate classes referenced by the documented sources. -
getAntGroovydoc
-
setAntGroovydoc
public void setAntGroovydoc(org.gradle.api.internal.tasks.AntGroovydoc antGroovydoc) -
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
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
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
-
setWindowTitle
Sets the browser window title for the documentation.- Parameters:
windowTitle- A text for the windows title
-
getDocTitle
-
setDocTitle
Sets title for the package index(first) page (optional).- Parameters:
docTitle- the docTitle as HTML
-
getHeader
-
setHeader
Sets header text for each page (optional).- Parameters:
header- the header as HTML
-
getOverviewText
Returns a HTML text to be used for overview documentation. Set tonullwhen there is no overview text. -
setOverviewText
Sets a HTML text to be used for overview documentation (optional).Example:
overviewText = resources.text.fromFile("/overview.html") -
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
Returns the links to groovydoc/javadoc output at the given URL. -
setLinks
Sets links to groovydoc/javadoc output at the given URL.- Parameters:
links- The links to set- See Also:
-
link
-