public interface AsciidoctorTaskFileOperations
| Modifier and Type | Method and Description |
|---|---|
void |
clearSecondarySources()
Clears any of the existing secondary soruces patterns.
|
void |
clearSources()
Clears existing sources patterns.
|
java.util.Set<java.io.File> |
getBackendOutputDirectories()
Returns a list of all output directories by backend.
|
org.gradle.api.file.CopySpec |
getDefaultResourceCopySpec(java.util.Optional<java.lang.String> lang)
The default CopySpec that will be used if
resources was never called
By default, anything below $sourceDir/images will be included. |
java.lang.String |
getEngineName()
The name of the Asciidoctor engine implementation.
|
org.gradle.api.provider.Provider<org.gradle.api.tasks.util.PatternSet> |
getIntermediateArtifactPatternProvider()
A provider of patterns identifying intermediate artifacts.
|
default java.io.File |
getIntermediateWorkDir()
The directory that will be the intermediate directory should one be required.
|
org.gradle.api.provider.Provider<java.io.File> |
getIntermediateWorkDirProvider() |
org.gradle.api.file.CopySpec |
getLanguageResourceCopySpec(java.lang.String lang)
Returns the copy specification for the resources of a specific language.
|
java.util.List<java.lang.String> |
getLanguages()
Obtain List of languages the sources documents are written in.
|
boolean |
getLogDocuments()
Logs documents as they are converted
|
default java.io.File |
getOutputDir()
Returns the current toplevel output directory
|
org.gradle.api.file.DirectoryProperty |
getOutputDirProperty()
Returns the current toplevel output directory as a property object.
|
org.gradle.api.file.CopySpec |
getResourceCopySpec(java.util.Optional<java.lang.String> lang)
Gets the CopySpec for additional resources.
|
org.gradle.api.file.FileTree |
getSecondarySourceFileTree()
Returns a FileTree containing all secondary source documents.
|
default java.io.File |
getSourceDir()
Returns the parent directory for Asciidoctor source.
|
org.gradle.api.file.DirectoryProperty |
getSourceDirProperty()
Returns the parent directory for Asciidoctor source as a property object.
|
org.gradle.api.file.FileTree |
getSourceFileTree()
Returns a FileTree containing all source documents
If a filter with
sources(groovy.lang.Closure<?>) was never set then all asciidoc source files
below setSourceDir(java.lang.Object) will be included. |
java.util.Map<java.lang.String,?> |
getTaskSpecificDefaultAttributes(java.io.File workingSourceDir)
A task may add some default attributes.
|
boolean |
hasIntermediateWorkDir()
Checks whether an intermediate workdir is required.
|
void |
languages(java.lang.Iterable<java.lang.String> langs)
Add to list of languages to process.
|
void |
languages(java.lang.String... langs)
Add to list of languages to process.
|
void |
resources(org.gradle.api.Action<? super org.gradle.api.file.CopySpec> cfg)
Add to the CopySpec for extra files.
|
void |
resources(groovy.lang.Closure cfg)
Add to the CopySpec for extra files.
|
void |
resources(java.lang.String lang,
org.gradle.api.Action<? super org.gradle.api.file.CopySpec> cfg)
Add to the CopySpec for extra files.
|
void |
resources(java.lang.String lang,
groovy.lang.Closure cfg)
Add to the CopySpec for extra files.
|
void |
secondarySources(org.gradle.api.Action<? super org.gradle.api.tasks.util.PatternSet> cfg)
Configures sources.
|
void |
secondarySources(groovy.lang.Closure<?> cfg)
Configures secondary sources.
|
void |
setLanguages(java.lang.Iterable<java.lang.String> langs)
Reset current list of languages and replace with a new set.
|
void |
setLogDocuments(boolean mode)
Whether to log documents as they are being converted.
|
void |
setOutputDir(java.lang.Object f)
Sets the new Asciidoctor parent output directory.
|
void |
setSourceDir(java.lang.Object f)
Sets the new Asciidoctor parent source directory.
|
void |
sourceDir(java.lang.Object f)
Sets the new Asciidoctor parent source directory in a declarative style.
|
void |
sources(org.gradle.api.Action<? super org.gradle.api.tasks.util.PatternSet> cfg)
Configures sources.
|
void |
sources(groovy.lang.Closure<?> cfg)
Configures sources.
|
void |
sources(java.lang.String... includePatterns)
Include source patterns.
|
void |
useIntermediateWorkDir()
Some extensions such as
ditaa creates images in the source directory. |
void |
withIntermediateArtifacts(org.gradle.api.Action<org.gradle.api.tasks.util.PatternSet> cfg)
Additional artifacts created by Asciidoctor that might require copying.
|
void |
withIntermediateArtifacts(groovy.lang.Closure cfg)
The document conversion might generate additional artifacts that could
require copying to the final destination.
|
@Internal java.lang.String getEngineName()
@Console boolean getLogDocuments()
true if documents should be logged.void setLogDocuments(boolean mode)
mode - Set true in order to log documents.void setSourceDir(java.lang.Object f)
f - Any object convertible with project.file.void sourceDir(java.lang.Object f)
f - Any object convertible with project.file.@Internal default java.io.File getSourceDir()
@Internal org.gradle.api.file.DirectoryProperty getSourceDirProperty()
@OutputDirectory default java.io.File getOutputDir()
void setOutputDir(java.lang.Object f)
f - An object convertible via project.file.@Internal org.gradle.api.file.DirectoryProperty getOutputDirProperty()
void sources(@DelegatesTo(value=org.gradle.api.tasks.util.PatternSet.class)
groovy.lang.Closure<?> cfg)
cfg - Configuration closure. Is passed a PatternSet.void sources(org.gradle.api.Action<? super org.gradle.api.tasks.util.PatternSet> cfg)
cfg - Configuration Action. Is passed a PatternSet.void sources(java.lang.String... includePatterns)
includePatterns - ANT-style patterns for sources to includevoid clearSources()
void clearSecondarySources()
void secondarySources(@DelegatesTo(value=org.gradle.api.tasks.util.PatternSet.class)
groovy.lang.Closure<?> cfg)
cfg - Configuration closure. Is passed a PatternSet.void secondarySources(org.gradle.api.Action<? super org.gradle.api.tasks.util.PatternSet> cfg)
cfg - Configuration Action. Is passed a PatternSet.@Internal org.gradle.api.provider.Provider<org.gradle.api.tasks.util.PatternSet> getIntermediateArtifactPatternProvider()
PatternSet. Can be empty.org.gradle.api.file.CopySpec getLanguageResourceCopySpec(java.lang.String lang)
lang - Languagenull.org.gradle.api.file.CopySpec getResourceCopySpec(java.util.Optional<java.lang.String> lang)
resources was never called, it will return a default CopySpec otherwise it will return the
one built up via successive calls to resourceslang - Language to to apply to or empty for no-language support.CopySpec. Never null.org.gradle.api.file.CopySpec getDefaultResourceCopySpec(java.util.Optional<java.lang.String> lang)
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.CopySpec. Never null.@Internal org.gradle.api.file.FileTree getSourceFileTree()
sources(groovy.lang.Closure<?>) was never set then all asciidoc source files
below setSourceDir(java.lang.Object) will be included. If multiple languages are used, all
* language secondary source sets are included.@Internal org.gradle.api.file.FileTree getSecondarySourceFileTree()
secondarySources(groovy.lang.Closure<?>) was never set then all asciidoc source files
below setSourceDir(java.lang.Object) will be included. If multiple languages are used, all
language secondary source sets are included.void resources(groovy.lang.Closure cfg)
outputDir or outputDir + backendcfg - CopySpec runConfiguration closurevoid resources(org.gradle.api.Action<? super org.gradle.api.file.CopySpec> cfg)
outputDir or outputDir + backendcfg - CopySpec runConfiguration Actionvoid resources(java.lang.String lang,
groovy.lang.Closure cfg)
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.void resources(java.lang.String lang,
org.gradle.api.Action<? super org.gradle.api.file.CopySpec> cfg)
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.void useIntermediateWorkDir()
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 pristineboolean hasIntermediateWorkDir()
true is there is an intermediate working directory.void withIntermediateArtifacts(@DelegatesTo(value=org.gradle.api.tasks.util.PatternSet.class)
groovy.lang.Closure cfg)
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.void withIntermediateArtifacts(org.gradle.api.Action<org.gradle.api.tasks.util.PatternSet> cfg)
cfg - Action that configures a PatternSet.@Internal default java.io.File getIntermediateWorkDir()
@Internal org.gradle.api.provider.Provider<java.io.File> getIntermediateWorkDirProvider()
@OutputDirectories java.util.Set<java.io.File> getBackendOutputDirectories()
@Input java.util.List<java.lang.String> getLanguages()
null.void setLanguages(java.lang.Iterable<java.lang.String> langs)
langs - List of new languagesvoid languages(java.lang.Iterable<java.lang.String> langs)
langs - List of additional languagesvoid languages(java.lang.String... langs)
langs - List of additional languagesjava.util.Map<java.lang.String,?> getTaskSpecificDefaultAttributes(java.io.File workingSourceDir)
includedir, revnumber, gradle-project-group,
gradle-project-nameworkingSourceDir - Directory where source files are located.