|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.Javadoc
public class Javadoc
Generates HTML API documentation for Java classes.
If you create your own Javadoc tasks remember to specify the 'source' property! Without source the javadoc task will not create any documentation. Example:
apply plugin: 'java' task myJavadocs(type: Javadoc) { source = sourceSets.main.allJava }
An example how to create a task that runs a custom doclet implementation:
apply plugin: 'java' configurations { jaxDoclet } dependencies { //jaxDoclet "some.interesting:Dependency:1.0" } task generateRestApiDocs(type: Javadoc) { source = sourceSets.main.allJava destinationDir = file("${reportsDir.absolutePath}/rest-api-docs") options.docletpath = configurations.jaxDoclet.files.asType(List) options.doclet = "com.lunatech.doclets.jax.jaxrs.JAXRSDoclet" options.addStringOption("jaxrscontext", "http://localhost:8080/myapp") }
Nested Class Summary |
---|
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_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE |
Constructor Summary | |
---|---|
Javadoc()
|
Method Summary | |
---|---|
protected void |
generate()
|
FileCollection |
getClasspath()
Returns the classpath to use to resolve type references in the source code. |
File |
getDestinationDir()
Returns the directory to generate the documentation into. |
String |
getExecutable()
Returns the javadoc executable to use to generation the javadoc. |
String |
getMaxMemory()
Returns the amount of memory allocated to this task. |
MinimalJavadocOptions |
getOptions()
Returns the javadoc generation options. |
File |
getOptionsFile()
|
String |
getTitle()
Returns the title for the generated documentation. |
boolean |
isFailOnError()
Specifies whether this task should fail when errors are encountered during javadoc generation. |
boolean |
isVerbose()
Returns whether javadoc generation is accompanied by verbose output. |
void |
setClasspath(FileCollection classpath)
Sets the classpath to use to resolve type references in this source code. |
void |
setDestinationDir(File destinationDir)
Sets the directory to generate the documentation into. |
void |
setExecutable(String executable)
|
void |
setFailOnError(boolean failOnError)
|
void |
setMaxMemory(String maxMemory)
Sets the amount of memory allocated to this task. |
void |
setOptions(MinimalJavadocOptions options)
Sets the javadoc generation options. |
void |
setTitle(String title)
Sets the title for the generated documentation. |
void |
setVerbose(boolean verbose)
Sets whether javadoc generation is accompanied by verbose output or not. |
Methods inherited from class org.gradle.api.tasks.SourceTask |
---|
exclude, exclude, exclude, exclude, getDefaultSource, getExcludes, getIncludes, getSource, include, include, include, include, setExcludes, setIncludes, setSource, source |
Methods inherited from class org.gradle.api.internal.ConventionTask |
---|
conventionMapping, getConventionMapping, setConventionMapping |
Methods inherited from class org.gradle.api.internal.AbstractTask |
---|
addValidator, captureStandardOutput, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, disableStandardOutputCapture, doFirst, doFirst, doLast, doLast, execute, getActions, getAdditionalProperties, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getDynamicObjectHelper, getEnabled, getExecuter, getGroup, getInputs, getLogger, getLogging, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getStandardOutputCapture, getState, getTaskDependencies, getTemporaryDir, getValidators, hasProperty, injectIntoNewInstance, isEnabled, leftShift, onlyIf, onlyIf, property, setActions, setConvention, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setGroup, setName, setOnlyIf, setOnlyIf, setProject, setProperty, toString |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Javadoc()
Method Detail |
---|
protected void generate()
public File getDestinationDir()
Returns the directory to generate the documentation into.
public void setDestinationDir(File destinationDir)
Sets the directory to generate the documentation into.
public String getMaxMemory()
public void setMaxMemory(String maxMemory)
maxMemory
- The amount of memorypublic String getTitle()
Returns the title for the generated documentation.
public void setTitle(String title)
Sets the title for the generated documentation.
public boolean isVerbose()
setVerbose(boolean)
public void setVerbose(boolean verbose)
verbose
- Whether the output should be verbose.public FileCollection getClasspath()
public void setClasspath(FileCollection classpath)
classpath
- The classpath. Must not be null.public MinimalJavadocOptions getOptions()
public void setOptions(MinimalJavadocOptions options)
options
- The options. Must not be null.public boolean isFailOnError()
true
,
this task will fail on javadoc error. When false
, this task will ignore javadoc errors.
public void setFailOnError(boolean failOnError)
public File getOptionsFile()
public String getExecutable()
null
, the javadoc executable for
the current jvm is used.
public void setExecutable(String executable)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |