interface PatternFilterable
A PatternFilterable
represents some file container which Ant-style include and exclude patterns or specs can be applied to.
Patterns may include:
Either '/' or '\' may be used in a pattern to separate directories. Patterns ending with '/' or '\' will have '**' automatically appended.
Examples:
all files ending with 'jsp' (including subdirectories) **/*.jsp all files beginning with 'template_' in the level1/level2 directory level1/level2/template_* all files (including subdirectories) beneath src/main/webapp src/main/webapp/ all files beneath any .svn directory (including subdirectories) under src/main/java src/main/java/**/.svn/**
You may also use a closure or Spec to specify which files to include or exclude. The closure or Spec is passed a org.gradle.api.file.FileTreeElement, and must return a boolean value.
If no include patterns or specs are specified, then all files in this container will be included. If any include patterns or specs are specified, then a file is included if it matches any of the patterns or specs.
If no exclude patterns or spec are specified, then no files will be excluded. If any exclude patterns or specs are specified, then a file is include only if it matches none of the patterns or specs.
abstract fun exclude(vararg excludes: String): PatternFilterable abstract fun exclude(excludes: MutableIterable<String>): PatternFilterable
Adds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed. abstract fun exclude(excludeSpec: Spec<FileTreeElement>): PatternFilterable
Adds an exclude spec. This method may be called multiple times to append new specs. If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed. abstract fun exclude(excludeSpec: Closure<Any>): PatternFilterable
Adds an exclude spec. This method may be called multiple times to append new specs.The given closure is passed a org.gradle.api.file.FileTreeElement as its parameter. The closure should return true or false. Example: If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed.
|
|
abstract fun getExcludes(): MutableSet<String>
Returns the set of exclude patterns. |
|
abstract fun getIncludes(): MutableSet<String>
Returns the set of include patterns. |
|
abstract fun include(vararg includes: String): PatternFilterable abstract fun include(includes: MutableIterable<String>): PatternFilterable
Adds an ANT style include pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns to be processed. abstract fun include(includeSpec: Spec<FileTreeElement>): PatternFilterable
Adds an include spec. This method may be called multiple times to append new specs. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns or specs to be included. abstract fun include(includeSpec: Closure<Any>): PatternFilterable
Adds an include spec. This method may be called multiple times to append new specs. The given closure is passed a org.gradle.api.file.FileTreeElement as its parameter. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns or specs to be included. |
|
abstract fun setExcludes(excludes: MutableIterable<String>): PatternFilterable
Set the allowable exclude patterns. Note that unlike |
|
abstract fun setIncludes(includes: MutableIterable<String>): PatternFilterable
Set the allowable include patterns. Note that unlike |
interface ConfigurableFileTree : FileTree, DirectoryTree, PatternFilterable, Buildable
A FileTree with a single base directory, which can be configured and modified. You can obtain a |
|
interface CopySpec : CopySourceSpec, CopyProcessingSpec, PatternFilterable
A set of specifications for copying files. This includes:
In this example, the into and exclude specifications at the root level are inherited by the two child CopySpecs. Copy specs can be reused in other copy specs via #with(CopySpec...) method. This enables reuse of the copy spec instances.
|
|
open class PatternSet : AntBuilderAware, PatternFilterable
Standalone implementation of PatternFilterable. |
|
interface SourceDirectorySet : FileTree, PatternFilterable, Named, Describable
A
|
|
open class SourceTask : ConventionTask, PatternFilterable
A |
|
open class Test : AbstractTestTask, JavaForkOptions, PatternFilterable
Executes JUnit (3.8.x, 4.x or 5.x) or TestNG tests. Test are always run in (one or more) separate JVMs. The sample below shows various configuration options.
The test process can be started in debug mode (see
|