public class SourceTask extends org.gradle.api.internal.ConventionTask implements PatternFilterable
SourceTask
performs some operation on source files.Task.Namer
修飾子とタイプ | フィールドと説明 |
---|---|
protected List<Object> |
source |
TASK_ACTION, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
コンストラクタと説明 |
---|
SourceTask() |
修飾子とタイプ | メソッドと説明 |
---|---|
SourceTask |
exclude(Closure excludeSpec)
Adds an exclude spec.
|
SourceTask |
exclude(Iterable<String> excludes)
Adds an ANT style exclude pattern.
|
SourceTask |
exclude(Spec<FileTreeElement> excludeSpec)
Adds an exclude spec.
|
SourceTask |
exclude(String... excludes)
Adds an ANT style exclude pattern.
|
Set<String> |
getExcludes()
Returns the set of exclude patterns.
|
Set<String> |
getIncludes()
Returns the set of include patterns.
|
FileTree |
getSource()
Returns the source for this task, after the include and exclude patterns have been applied.
|
SourceTask |
include(Closure includeSpec)
Adds an include spec.
|
SourceTask |
include(Iterable<String> includes)
Adds an ANT style include pattern.
|
SourceTask |
include(Spec<FileTreeElement> includeSpec)
Adds an include spec.
|
SourceTask |
include(String... includes)
Adds an ANT style include pattern.
|
SourceTask |
setExcludes(Iterable<String> excludes)
Set the allowable exclude patterns.
|
SourceTask |
setIncludes(Iterable<String> includes)
Set the allowable include patterns.
|
void |
setSource(Object source)
Sets the source for this task.
|
SourceTask |
source(Object... sources)
Adds some source to this task.
|
conventionMapping, conventionMapping, getConventionMapping
addValidator, compareTo, configure, deleteAllActions, dependsOn, dependsOnTaskDidWork, doFirst, doFirst, doLast, doLast, execute, executeWithoutThrowingTaskFailure, finalizedBy, getActions, getAnt, getAsDynamicObject, getConvention, getDependsOn, getDescription, getDidWork, getEnabled, getExecuter, getExtensions, getFinalizedBy, getGroup, getImpliesSubProjects, getInputs, getLogger, getLogging, getMustRunAfter, getName, getOnlyIf, getOutputs, getPath, getProject, getServices, getShouldRunAfter, getStandardOutputCapture, getState, getTaskActions, getTaskDependencies, getTemporaryDir, getTemporaryDirFactory, getValidators, hasProperty, injectIntoNewInstance, isEnabled, leftShift, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setExecuter, setFinalizedBy, setGroup, setImpliesSubProjects, setMustRunAfter, setName, setOnlyIf, setOnlyIf, setProject, setProperty, setShouldRunAfter, shouldRunAfter, toString
@InputFiles @SkipWhenEmpty public FileTree getSource()
public void setSource(Object source)
Project.files(Object...)
.source
- The source.public SourceTask source(Object... sources)
Project.files(Object...)
.sources
- The source to addpublic SourceTask include(String... includes)
include
インタフェース内 PatternFilterable
includes
- a vararg list of include patternsPattern Format
public SourceTask include(Iterable<String> includes)
include
インタフェース内 PatternFilterable
includes
- a Iterable providing more include patternsPattern Format
public SourceTask include(Spec<FileTreeElement> includeSpec)
include
インタフェース内 PatternFilterable
includeSpec
- the spec to addPattern Format
public SourceTask include(Closure includeSpec)
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.include
インタフェース内 PatternFilterable
includeSpec
- the spec to addPattern Format
public SourceTask exclude(String... excludes)
exclude
インタフェース内 PatternFilterable
excludes
- a vararg list of exclude patternsPattern Format
public SourceTask exclude(Iterable<String> excludes)
exclude
インタフェース内 PatternFilterable
excludes
- a Iterable providing new exclude patternsPattern Format
public SourceTask exclude(Spec<FileTreeElement> excludeSpec)
exclude
インタフェース内 PatternFilterable
excludeSpec
- the spec to addPattern Format
public SourceTask exclude(Closure excludeSpec)
FileTreeElement
as its parameter. The closure should return true or false. Example:
copySpec { from 'source' into 'destination' //an example of excluding files from certain configuration: exclude { it.file in configurations.someConf.files } }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.
exclude
インタフェース内 PatternFilterable
excludeSpec
- the spec to addFileTreeElement
public Set<String> getIncludes()
getIncludes
インタフェース内 PatternFilterable
public SourceTask setIncludes(Iterable<String> includes)
PatternFilterable.include(Iterable)
this replaces any previously
defined includes.setIncludes
インタフェース内 PatternFilterable
includes
- an Iterable providing new include patternsPattern Format
public Set<String> getExcludes()
getExcludes
インタフェース内 PatternFilterable
public SourceTask setExcludes(Iterable<String> excludes)
PatternFilterable.exclude(Iterable)
this replaces any previously
defined excludes.setExcludes
インタフェース内 PatternFilterable
excludes
- an Iterable providing new exclude patternsPattern Format