@groovy.transform.CompileStatic class AsciidoctorUtils extends Object
Utility methods used internally by Asciidoctor plugins.
| Modifiers | Name | Description |
|---|---|---|
class |
AsciidoctorUtils.1 |
| Modifiers | Name | Description |
|---|---|---|
static org.ysb33r.grolifant.api.core.OperatingSystem |
OS |
|
static String |
UNDERSCORE_LED_FILES |
|
static PatternSet |
UNDERSCORE_LED_PATTERN |
| Type | Name and description |
|---|---|
static Spec<? super File> |
ACCEPT_ONLY_FILES |
| Constructor and description |
|---|
AsciidoctorUtils
() |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static DirectoryProperty |
createDirectoryProperty(Project project)Creates a DirectoryProperty instance in a way that is backwards-comaptible to Gradle 4.3. |
|
static void |
executeDelegatingClosure(Object delegated, groovy.lang.Closure cfg)Executes a configuration closure. |
|
static File |
getClassLocation(Class aClass)Returns the location of a class |
|
static String |
getRelativePath(File target, File base)Returns the path of one File relative to another. |
|
static String |
getRelativePathToFsRoot(File target)Get relative path to the current filesystem root |
|
static FileTree |
getSourceFileTree(Project project, File sourceDir, PatternSet filePatterns)Gets a fileTree that described an Asciidoctor set of source files. |
|
static FileTree |
getSourceFileTree(org.ysb33r.grolifant.api.core.ProjectOperations po, File sourceDir, PatternSet filePatterns)Gets a fileTree that described an Asciidoctor set of source files. |
|
static Provider<Directory> |
mapToDirectoryProvider(Project project, Object value)Maps a file object to a directory provider |
|
static String |
normalizePath(String path)Normalises slashes in a path. |
|
static void |
setConvention(Project project, Property<Directory> property, Directory value)Apply convention in way that is backward-comatible to Gradle 4.3, but utilises features when available in later Gradle releases. |
<T> |
static void |
setConvention(Property<T> property, Provider<T> value)Sets a property convention using a provider in a way that is compatible back to Gradle 4.3. |
Creates a DirectoryProperty instance in a way that is backwards-comaptible to Gradle 4.3.
project - Current project contextDirectoryProperty instanceExecutes a configuration closure. The closure will be cloned before execution.
delegated - Closure delegatecfg - Closure to executeReturns the location of a class
aClass - Class to look for.Returns the path of one File relative to another.
target - the target directorybase - the base directoryGet relative path to the current filesystem root
target - The target directoryGets a fileTree that described an Asciidoctor set of source files. @deprecated
project - Project to associate the file collection tp.sourceDir - Base directory for the sourcs.filePatterns - Patterns to use to identify suitable sources.Gets a fileTree that described an Asciidoctor set of source files.
po - org.ysb33r.grolifant.api.core.ProjectOperations instance to applusourceDir - Base directory for the sourcs.filePatterns - Patterns to use to identify suitable sources.Maps a file object to a directory provider
project - Project contextvalue - Anything convertible with project.fileNormalises slashes in a path.
Apply convention in way that is backward-comatible to Gradle 4.3, but utilises features when available in later Gradle releases.
project - Current project context.property - Directory property to which convention should be appliedvalue - Default value of directory.Copyright © 2013-2024 the original author or authors. All rights reserved.