Groovy Documentation

org.gradle.api.tasks
[Java] Class SourceTask

java.lang.Object
  org.gradle.api.internal.ConventionTask
      org.gradle.api.tasks.SourceTask
All Implemented Interfaces:
PatternFilterable

public class SourceTask
extends ConventionTask

A SourceTask performs some operation on source files.


Field Summary
protected List source

 
Method Summary
SourceTask exclude(String... excludes)

{@inheritDoc}

SourceTask exclude(Iterable excludes)

{@inheritDoc}

SourceTask exclude(Spec excludeSpec)

{@inheritDoc}

SourceTask exclude(Closure excludeSpec)

{@inheritDoc}

protected FileTree getDefaultSource()

Returns the default source for this task, if any.

Set getExcludes()

{@inheritDoc}

Set getIncludes()

{@inheritDoc}

FileTree getSource()

Returns the source for this task, after the include and exclude patterns have been applied.

SourceTask include(String... includes)

{@inheritDoc}

SourceTask include(Iterable includes)

{@inheritDoc}

SourceTask include(Spec includeSpec)

{@inheritDoc}

SourceTask include(Closure includeSpec)

{@inheritDoc}

SourceTask setExcludes(Iterable excludes)

{@inheritDoc}

SourceTask setIncludes(Iterable includes)

{@inheritDoc}

void setSource(Object source)

Sets the source for this task.

SourceTask source(Object... sources)

Adds some source to this task.

 

Field Detail

source

protected final List source


 
Method Detail

exclude

public SourceTask exclude(String... excludes)
{@inheritDoc}


exclude

public SourceTask exclude(Iterable excludes)
{@inheritDoc}


exclude

public SourceTask exclude(Spec excludeSpec)
{@inheritDoc}


exclude

public SourceTask exclude(Closure excludeSpec)
{@inheritDoc}


getDefaultSource

@Deprecated
protected FileTree getDefaultSource()
Returns the default source for this task, if any.
deprecated:
Use getSource() instead.
Returns:
The source. May return null.


getExcludes

public Set getExcludes()
{@inheritDoc}


getIncludes

public Set getIncludes()
{@inheritDoc}


getSource

@InputFiles
@SkipWhenEmpty
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.
Returns:
The source.


include

public SourceTask include(String... includes)
{@inheritDoc}


include

public SourceTask include(Iterable includes)
{@inheritDoc}


include

public SourceTask include(Spec includeSpec)
{@inheritDoc}


include

public SourceTask include(Closure includeSpec)
{@inheritDoc}


setExcludes

public SourceTask setExcludes(Iterable excludes)
{@inheritDoc}


setIncludes

public SourceTask setIncludes(Iterable includes)
{@inheritDoc}


setSource

public void setSource(Object source)
Sets the source for this task. The given source object is evaluated as per Project.files.
Parameters:
source - The source.


source

public SourceTask source(Object... sources)
Adds some source to this task. The given source objects will be evaluated as per Project.files.
Parameters:
sources - The source to add
Returns:
this


 

Gradle API 1.12