public interface AsciidoctorTaskFileOperations
The standard methods all Asciidoctor conversion tasks will offer.
| Type Params | Return Type | Name and description |
|---|---|---|
|
public void |
clearSecondarySources()Clears any of the existing secondary soruces patterns. |
|
public void |
clearSources()Clears existing sources patterns. |
|
public Set<File> |
getBackendOutputDirectories()Returns a list of all output directories by backend |
|
public CopySpec |
getDefaultResourceCopySpec(Optional<String> lang)The default CopySpec that will be used if resources was never called |
|
public String |
getEngineName()The name of the Asciidoctor engine implementation. |
|
public Provider<PatternSet> |
getIntermediateArtifactPatternProvider()A provider of patterns identifying intermediate artifacts. |
|
public File |
getIntermediateWorkDir()The directory that will be the intermediate directory should one be required. |
|
public Provider<File> |
getIntermediateWorkDirProvider() |
|
public CopySpec |
getLanguageResourceCopySpec(String lang)Returns the copy specification for the resources of a specific language. |
|
public List<String> |
getLanguages()Obtain List of languages the sources documents are written in. |
|
public boolean |
getLogDocuments()Logs documents as they are converted |
|
public File |
getOutputDir()Returns the current toplevel output directory |
|
public DirectoryProperty |
getOutputDirProperty()Returns the current toplevel output directory as a property object. |
|
public CopySpec |
getResourceCopySpec(Optional<String> lang)Gets the CopySpec for additional resources. |
|
public FileTree |
getSecondarySourceFileTree()Returns a FileTree containing all secondary source documents. |
|
public File |
getSourceDir()Returns the parent directory for Asciidoctor source. |
|
public DirectoryProperty |
getSourceDirProperty()Returns the parent directory for Asciidoctor source as a property object. |
|
public FileTree |
getSourceFileTree()Returns a FileTree containing all source documents |
|
public Map<String, ?> |
getTaskSpecificDefaultAttributes(File workingSourceDir)A task may add some default attributes. |
|
public boolean |
hasIntermediateWorkDir()Checks whether an intermediate workdir is required. |
|
public void |
languages(Iterable<String> langs)Add to list of languages to process. |
|
public void |
languages(String langs)Add to list of languages to process. |
|
public void |
resources(groovy.lang.Closure cfg)Add to the CopySpec for extra files. |
|
public void |
resources(Action<? super CopySpec> cfg)Add to the CopySpec for extra files. |
|
public void |
resources(String lang, groovy.lang.Closure cfg)Add to the CopySpec for extra files. |
|
public void |
resources(String lang, Action<? super CopySpec> cfg)Add to the CopySpec for extra files. |
|
public void |
secondarySources(groovy.lang.Closure<?> cfg)Configures secondary sources. |
|
public void |
secondarySources(Action<? super PatternSet> cfg)Configures sources. |
|
public void |
setLanguages(Iterable<String> langs)Reset current list of languages and replace with a new set. |
|
public void |
setLogDocuments(boolean mode)Whether to log documents as they are being converted. |
|
public void |
setOutputDir(Object f)Sets the new Asciidoctor parent output directory. |
|
public void |
setSourceDir(Object f)Sets the new Asciidoctor parent source directory. |
|
public void |
sourceDir(Object f)Sets the new Asciidoctor parent source directory in a declarative style. |
|
public void |
sources(groovy.lang.Closure<?> cfg)Configures sources. |
|
public void |
sources(Action<? super PatternSet> cfg)Configures sources. |
|
public void |
sources(String includePatterns)Include source patterns. |
|
public void |
useIntermediateWorkDir()Some extensions such as ditaa creates images in the source directory. |
|
public void |
withIntermediateArtifacts(groovy.lang.Closure cfg)The document conversion might generate additional artifacts that could require copying to the final destination. |
|
public void |
withIntermediateArtifacts(Action<PatternSet> cfg)Additional artifacts created by Asciidoctor that might require copying. |
Clears any of the existing secondary soruces patterns. This should be used if none of the default patterns should be monitored.
Clears existing sources patterns.
Returns a list of all output directories by backend
The default CopySpec that will be used if resources was never called
By default, anything below $sourceDir/images will be included.
lang - Language to use. Can be empty (not null) when not to use a language.null.The name of the Asciidoctor engine implementation.
A provider of patterns identifying intermediate artifacts.
The directory that will be the intermediate directory should one be required.
Returns the copy specification for the resources of a specific language.
lang - Languagenull.Obtain List of languages the sources documents are written in.
null.Logs documents as they are converted
Returns the current toplevel output directory
Returns the current toplevel output directory as a property object.
Gets the CopySpec for additional resources.
If resources was never called, it will return a default CopySpec otherwise it will return the
one built up via successive calls to resources
lang - Language to to apply to or empty for no-language support.null.Returns a FileTree containing all secondary source documents. If a filter with secondarySources was never set then all asciidoc source files below setSourceDir will be included. If multiple languages are used, all language secondary source sets are included.
Returns the parent directory for Asciidoctor source.
Returns the parent directory for Asciidoctor source as a property object.
Returns a FileTree containing all source documents If a filter with sources was never set then all asciidoc source files below setSourceDir will be included. If multiple languages are used, all * language secondary source sets are included.
A task may add some default attributes.
If the user specifies any of these attributes, then those attributes will not be utilised.
The default implementation will add includedir, revnumber, gradle-project-group,
gradle-project-name
workingSourceDir - Directory where source files are located.Checks whether an intermediate workdir is required.
true is there is an intermediate working directory.Add to list of languages to process.
langs - List of additional languagesAdd to list of languages to process.
langs - List of additional languages Add to the CopySpec for extra files. The destination of these files will always have a parent directory
of outputDir or outputDir + backend
cfg - CopySpec runConfiguration closure Add to the CopySpec for extra files. The destination of these files will always have a parent directory
of outputDir or outputDir + backend
Add to the CopySpec for extra files. The destination of these files will always have a parent directory
of outputDir or outputDir + backend
If not languages are set. these resources will be ignored.
cfg - CopySpec runConfiguration closurelang - Language to which these resources will be applied to. Add to the CopySpec for extra files. The destination of these files will always have a parent directory
of outputDir or outputDir + backend
If not languages are set. these resources will be ignored.
cfg - CopySpec runConfiguration Actionlang - Language to which these resources will be applied to.Configures secondary sources.
cfg - Configuration closure. Is passed a PatternSet.Configures sources.
cfg - Configuration Action. Is passed a PatternSet.Reset current list of languages and replace with a new set.
langs - List of new languagesWhether to log documents as they are being converted.
mode - Set true in order to log documents.Sets the new Asciidoctor parent output directory.
f - An object convertible via project.file.Sets the new Asciidoctor parent source directory.
f - Any object convertible with project.file.Sets the new Asciidoctor parent source directory in a declarative style.
f - Any object convertible with project.file.Configures sources.
cfg - Configuration closure. Is passed a PatternSet.Configures sources.
cfg - Configuration Action. Is passed a PatternSet.Include source patterns.
includePatterns - ANT-style patterns for sources to include Some extensions such as ditaa creates images in the source directory.
Use this setting to copy all sources and resources to an intermediate work directory
before processing starts. This will keep the source directory pristine
The document conversion might generate additional artifacts that could
require copying to the final destination.
An example is use of ditaa diagram blocks. These artifacts can be specified
in this block. Use of the option implies useIntermediateWorkDir.
cfg - Configures a PatternSet with a base directory of the intermediate working
directory.Additional artifacts created by Asciidoctor that might require copying.
cfg - Action that configures a PatternSet.