Package org.gradle.api.tasks
Klasse SourceTask
java.lang.Object
org.gradle.api.internal.AbstractTask
org.gradle.api.DefaultTask
org.gradle.api.internal.ConventionTask
org.gradle.api.tasks.SourceTask
- Alle implementierten Schnittstellen:
Comparable<Task>,org.gradle.api.internal.DynamicObjectAware,org.gradle.api.internal.IConventionAware,org.gradle.api.internal.TaskInternal,Named,ExtensionAware,Task,PatternFilterable,Configurable<Task>
- Bekannte direkte Unterklassen:
AbstractCodeQualityTask,AbstractCompile,AntlrTask,Groovydoc,Javadoc,ScalaDoc
@NonNullApi
@DisableCachingByDefault(because="Super-class, not to be instantiated directly")
public abstract class SourceTask
extends org.gradle.api.internal.ConventionTask
implements PatternFilterable
A
SourceTask performs some operation on source files.-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.gradle.api.Task
Task.Namer -
Feldübersicht
Von Schnittstelle geerbte Felder org.gradle.api.Task
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE -
Konstruktorübersicht
Konstruktoren -
Methodenübersicht
Modifizierer und TypMethodeBeschreibungAdds an exclude spec.Adds an ANT style exclude pattern.Adds an ANT style exclude pattern.exclude(Spec<FileTreeElement> excludeSpec) Adds an exclude spec.Returns the set of exclude patterns.Returns the set of include patterns.protected PatternFilterableprotected org.gradle.api.tasks.util.internal.PatternSetFactoryReturns the source for this task, after the include and exclude patterns have been applied.Adds an include spec.Adds an ANT style include pattern.Adds an ANT style include pattern.include(Spec<FileTreeElement> includeSpec) Adds an include spec.setExcludes(Iterable<String> excludes) Set the allowable exclude patterns.setIncludes(Iterable<String> includes) Set the allowable include patterns.voidSets the source for this task.voidSets the source for this task.Adds some source to this task.Von Klasse geerbte Methoden org.gradle.api.internal.ConventionTask
conventionMapping, conventionMapping, getConventionMappingVon Klasse geerbte Methoden org.gradle.api.DefaultTask
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesServiceVon Klasse geerbte Methoden org.gradle.api.internal.AbstractTask
acceptServiceReferences, appendParallelSafeAction, doNotTrackState, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getLifecycleDependencies, getOnlyIf, getReasonNotToTrackState, getReasonTaskIsIncompatibleWithConfigurationCache, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isCompatibleWithConfigurationCache, isEnabled, isHasCustomActions, notCompatibleWithConfigurationCache, prependParallelSafeAction, setImpliesSubProjectsVon Klasse geerbte Methoden java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitVon Schnittstelle geerbte Methoden org.gradle.api.Task
doNotTrackState, getConvention, notCompatibleWithConfigurationCache
-
Konstruktordetails
-
SourceTask
public SourceTask()
-
-
Methodendetails
-
getPatternSetFactory
@Inject protected org.gradle.api.tasks.util.internal.PatternSetFactory getPatternSetFactory() -
getPatternSet
-
getSource
@InputFiles @SkipWhenEmpty @IgnoreEmptyDirectories @PathSensitive(ABSOLUTE) public FileTree getSource()Returns the source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist.The
PathSensitivityfor the sources is configured to bePathSensitivity.ABSOLUTE. If your sources are less strict, please change it accordingly by overriding this method in your subclass.- Gibt zurück:
- The source.
-
setSource
Sets the source for this task.- Parameter:
source- The source.- Seit:
- 4.0
-
setSource
Sets the source for this task. The given source object is evaluated as perProject.files(Object...).- Parameter:
source- The source.
-
source
Adds some source to this task. The given source objects will be evaluated as perProject.files(Object...).- Parameter:
sources- The source to add- Gibt zurück:
- this
-
include
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.- Angegeben von:
includein SchnittstellePatternFilterable- Parameter:
includes- a vararg list of include patterns- Gibt zurück:
- this
- Siehe auch:
-
include
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.- Angegeben von:
includein SchnittstellePatternFilterable- Parameter:
includes- a Iterable providing more include patterns- Gibt zurück:
- this
- Siehe auch:
-
include
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.- Angegeben von:
includein SchnittstellePatternFilterable- Parameter:
includeSpec- the spec to add- Gibt zurück:
- this
- Siehe auch:
-
include
Adds an include spec. This method may be called multiple times to append new specs. The given closure is passed aFileTreeElementas 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.- Angegeben von:
includein SchnittstellePatternFilterable- Parameter:
includeSpec- the spec to add- Gibt zurück:
- this
- Siehe auch:
-
exclude
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.- Angegeben von:
excludein SchnittstellePatternFilterable- Parameter:
excludes- a vararg list of exclude patterns- Gibt zurück:
- this
- Siehe auch:
-
exclude
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.- Angegeben von:
excludein SchnittstellePatternFilterable- Parameter:
excludes- a Iterable providing new exclude patterns- Gibt zurück:
- this
- Siehe auch:
-
exclude
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.- Angegeben von:
excludein SchnittstellePatternFilterable- Parameter:
excludeSpec- the spec to add- Gibt zurück:
- this
- Siehe auch:
-
exclude
Adds an exclude spec. This method may be called multiple times to append new specs.The given closure is passed aFileTreeElementas 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.- Angegeben von:
excludein SchnittstellePatternFilterable- Parameter:
excludeSpec- the spec to add- Gibt zurück:
- this
- Siehe auch:
-
getIncludes
Returns the set of include patterns.- Angegeben von:
getIncludesin SchnittstellePatternFilterable- Gibt zurück:
- The include patterns. Returns an empty set when there are no include patterns.
-
setIncludes
Set the allowable include patterns. Note that unlikePatternFilterable.include(Iterable)this replaces any previously defined includes.- Angegeben von:
setIncludesin SchnittstellePatternFilterable- Parameter:
includes- an Iterable providing new include patterns- Gibt zurück:
- this
- Siehe auch:
-
getExcludes
Returns the set of exclude patterns.- Angegeben von:
getExcludesin SchnittstellePatternFilterable- Gibt zurück:
- The exclude patterns. Returns an empty set when there are no exclude patterns.
-
setExcludes
Set the allowable exclude patterns. Note that unlikePatternFilterable.exclude(Iterable)this replaces any previously defined excludes.- Angegeben von:
setExcludesin SchnittstellePatternFilterable- Parameter:
excludes- an Iterable providing new exclude patterns- Gibt zurück:
- this
- Siehe auch:
-