Groovy Documentation

org.gradle.api.tasks.javadoc
[Java] Class Javadoc

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

public class Javadoc
extends SourceTask

Generates HTML API documentation for Java classes.

Authors:
Hans Dockter


Method Summary
protected void generate()

FileCollection getClasspath()

Returns the classpath to use to resolve type references in the source code.

java.io.File getDestinationDir()

Returns the directory to generate the documentation into.

java.lang.String getExecutable()

Returns the javadoc executable to use to generation the javadoc.

java.lang.String getMaxMemory()

Returns the amount of memory allocated to this task.

MinimalJavadocOptions getOptions()

Returns the javadoc generation options.

java.io.File getOptionsFile()

java.lang.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(java.io.File destinationDir)

Sets the directory to generate the documentation into.

void setExecutable(java.lang.String executable)

void setFailOnError(boolean failOnError)

void setMaxMemory(java.lang.String maxMemory)

Sets the amount of memory allocated to this task.

void setOptions(MinimalJavadocOptions options)

Sets the javadoc generation options.

void setTitle(java.lang.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 SourceTask
exclude, exclude, exclude, exclude, getDefaultSource, getExcludes, getIncludes, getSource, include, include, include, include, setExcludes, setIncludes, setSource, source
 

Method Detail

generate

@TaskAction
protected void generate()


getClasspath

@InputFiles
public FileCollection getClasspath()
Returns the classpath to use to resolve type references in the source code.
Returns:
The classpath.


getDestinationDir

@OutputDirectory
public java.io.File getDestinationDir()

Returns the directory to generate the documentation into.

Returns:
The directory.


getExecutable

@Input
@Optional
public java.lang.String getExecutable()
Returns the javadoc executable to use to generation the javadoc. When null, the javadoc executable for the current jvm is used.
Returns:
The executable. May be null.


getMaxMemory

public java.lang.String getMaxMemory()
Returns the amount of memory allocated to this task.


getOptions

@Nested
public MinimalJavadocOptions getOptions()
Returns the javadoc generation options.
Returns:
The options. Never returns null.


getOptionsFile

public java.io.File getOptionsFile()


getTitle

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

Returns the title for the generated documentation.

Returns:
The title, possibly null.


isFailOnError

@Input
public boolean isFailOnError()
Specifies whether this task should fail when errors are encountered during javadoc generation. When true, this task will fail on javadoc error. When false, this task will ignore javadoc errors.


isVerbose

public boolean isVerbose()
Returns whether javadoc generation is accompanied by verbose output.
See Also:
setVerbose(boolean)


setClasspath

public void setClasspath(FileCollection classpath)
Sets the classpath to use to resolve type references in this source code.
Parameters:
classpath - The classpath. Must not be null.


setDestinationDir

public void setDestinationDir(java.io.File destinationDir)

Sets the directory to generate the documentation into.


setExecutable

public void setExecutable(java.lang.String executable)


setFailOnError

public void setFailOnError(boolean failOnError)


setMaxMemory

public void setMaxMemory(java.lang.String maxMemory)
Sets the amount of memory allocated to this task.
Parameters:
maxMemory - The amount of memory


setOptions

public void setOptions(MinimalJavadocOptions options)
Sets the javadoc generation options.
Parameters:
options - The options. Must not be null.


setTitle

public void setTitle(java.lang.String title)

Sets the title for the generated documentation.


setVerbose

public void setVerbose(boolean verbose)
Sets whether javadoc generation is accompanied by verbose output or not. The verbose output is done via println (by the underlying ant task). Thus it is not handled by our logging.
Parameters:
verbose - Whether the output should be verbose.


 

Groovy Documentation