Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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.

Method Summary
`SourceTask` | `exclude(java.lang.String excludes)` {@inheritDoc}
`SourceTask` | `exclude(java.lang.Iterable excludes)` {@inheritDoc}
`SourceTask` | `exclude(Spec excludeSpec)` {@inheritDoc}
`SourceTask` | `exclude(groovy.lang.Closure excludeSpec)` {@inheritDoc}
`protected FileTree` | `getDefaultSource()` Returns the default source for this task, if any.
`java.util.Set` | `getExcludes()` {@inheritDoc}
`java.util.Set` | `getIncludes()` {@inheritDoc}
`FileTree` | `getSource()` Returns the source for this task, after the include and exclude patterns have been applied.
`SourceTask` | `include(java.lang.String includes)` {@inheritDoc}
`SourceTask` | `include(java.lang.Iterable includes)` {@inheritDoc}
`SourceTask` | `include(Spec includeSpec)` {@inheritDoc}
`SourceTask` | `include(groovy.lang.Closure includeSpec)` {@inheritDoc}
`SourceTask` | `setExcludes(java.lang.Iterable excludes)` {@inheritDoc}
`SourceTask` | `setIncludes(java.lang.Iterable includes)` {@inheritDoc}
`void` | `setSource(java.lang.Object source)` Sets the source for this task.
`SourceTask` | `source(java.lang.Object sources)` Adds some source to this task.

Method Detail

### exclude

    public SourceTask exclude(java.lang.String excludes)

  {@inheritDoc}

### exclude

    public SourceTask exclude(java.lang.Iterable excludes)

  {@inheritDoc}

### exclude

    public SourceTask exclude(Spec excludeSpec)

  {@inheritDoc}

### exclude

    public SourceTask exclude(groovy.lang.Closure excludeSpec)

  {@inheritDoc}

### getDefaultSource

    protected FileTree getDefaultSource()

  Returns the default source for this task, if any.
  Returns:
    The source. May return null.

### getExcludes

    public java.util.Set getExcludes()

  {@inheritDoc}

### getIncludes

    public java.util.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(java.lang.String includes)

  {@inheritDoc}

### include

    public SourceTask include(java.lang.Iterable includes)

  {@inheritDoc}

### include

    public SourceTask include(Spec includeSpec)

  {@inheritDoc}

### include

    public SourceTask include(groovy.lang.Closure includeSpec)

  {@inheritDoc}

### setExcludes

    public SourceTask setExcludes(java.lang.Iterable excludes)

  {@inheritDoc}

### setIncludes

    public SourceTask setIncludes(java.lang.Iterable includes)

  {@inheritDoc}

### setSource

    public void setSource(java.lang.Object source)

  Sets the source for this task. The given source object is evaluated as for Project.files.
  Parameters:
    `source` - The source.

### source

    public SourceTask source(java.lang.Object sources)

  Adds some source to this task. The given source objects will be evaluated as for Project.files.
  Parameters:
    `sources` - The source to add
  Returns:
    this

Groovy Documentation