@CacheableTask open class Javadoc : SourceTask
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 = reporting.file("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") }
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:
An example how to create a task that runs a custom doclet implementation:
|
open fun getClasspath(): FileCollection
Returns the classpath to use to resolve type references in the source code. |
|
open fun getDestinationDir(): File
Returns the directory to generate the documentation into. |
|
open fun getExecutable(): String
Returns the Javadoc executable to use to generate the Javadoc. When |
|
open fun getMaxMemory(): String
Returns the amount of memory allocated to this task. |
|
open fun getOptions(): MinimalJavadocOptions
Returns the Javadoc generation options. |
|
open fun getOptionsFile(): File |
|
open fun getSource(): FileTree
{@inheritDoc} |
|
open fun getTitle(): String
Returns the title for the generated documentation. |
|
open fun getToolChain(): JavaToolChain
Returns the tool chain that will be used to generate the Javadoc. |
|
open fun isFailOnError(): Boolean
Specifies whether this task should fail when errors are encountered during Javadoc generation. When |
|
open fun isVerbose(): Boolean
Returns whether Javadoc generation is accompanied by verbose output. |
|
open fun options(block: Closure<*>): Unit open fun options(action: Action<in MinimalJavadocOptions>): Unit
Convenience method for configuring Javadoc generation options. |
|
open fun setClasspath(classpath: FileCollection): Unit
Sets the classpath to use to resolve type references in this source code. |
|
open fun setDestinationDir(destinationDir: File): Unit
Sets the directory to generate the documentation into. |
|
open fun setExecutable(executable: String): Unit |
|
open fun setFailOnError(failOnError: Boolean): Unit |
|
open fun setMaxMemory(maxMemory: String): Unit
Sets the amount of memory allocated to this task. |
|
open fun setTitle(title: String): Unit
Sets the title for the generated documentation. |
|
open fun setToolChain(toolChain: JavaToolChain): Unit
Sets the tool chain to use to generate the Javadoc. |
|
open fun setVerbose(verbose: Boolean): Unit
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. |
open fun exclude(vararg excludes: String): SourceTask open fun exclude(excludes: MutableIterable<String>): SourceTask open fun exclude(excludeSpec: Spec<FileTreeElement>): SourceTask open fun exclude(excludeSpec: Closure<Any>): SourceTask
{@inheritDoc} |
|
open fun getExcludes(): MutableSet<String>
{@inheritDoc} |
|
open fun getIncludes(): MutableSet<String>
{@inheritDoc} |
|
open fun include(vararg includes: String): SourceTask open fun include(includes: MutableIterable<String>): SourceTask open fun include(includeSpec: Spec<FileTreeElement>): SourceTask open fun include(includeSpec: Closure<Any>): SourceTask
{@inheritDoc} |
|
open fun setExcludes(excludes: MutableIterable<String>): SourceTask
{@inheritDoc} |
|
open fun setIncludes(includes: MutableIterable<String>): SourceTask
{@inheritDoc} |
|
open fun setSource(source: FileTree): Unit
Sets the source for this task. open fun setSource(source: Any): Unit
Sets the source for this task. The given source object is evaluated as per |
|
open fun source(vararg sources: Any): SourceTask
Adds some source to this task. The given source objects will be evaluated as per |