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

## org.gradle.api.tasks
[Java] Interface SourceSetContainer

    org.gradle.api.NamedDomainObjectSet
      java.lang.Iterable
          org.gradle.api.NamedDomainObjectCollection
              org.gradle.api.DomainObjectCollection
                  org.gradle.util.Configurable
                      java.util.Collection
                          org.gradle.api.NamedDomainObjectContainer
                              org.gradle.api.tasks.SourceSetContainer

All Superinterfaces:
  NamedDomainObjectSet, Iterable, NamedDomainObjectCollection, DomainObjectCollection, Configurable, Collection, NamedDomainObjectContainer

    public interface SourceSetContainer
    extends NamedDomainObjectContainer, NamedDomainObjectSet

A `SourceSetContainer` manages a set of SourceSet objects.

Method Summary
`SourceSet` | `add(String name)` Adds a source set with the given name.
`SourceSet` | `add(String name, Closure configureClosure)` Adds a source set with the given name.

Methods inherited from interface NamedDomainObjectSet
findAll, matching, matching, withType

Methods inherited from interface NamedDomainObjectContainer
configure, create, create, create, maybeCreate

Methods inherited from interface NamedDomainObjectSet
findAll, matching, matching, withType

Method Detail

### add

    @Deprecated
    public SourceSet add(String name)

  Adds a source set with the given name.
  throws:
    org.gradle.api.InvalidUserDataException when a source set with the given name already exists in this container.
  deprecated:
    use create(String) instead
  Parameters:
    `name` - The name of the new source set.
  Returns:
    The newly added source set.

### add

    @Deprecated
    public SourceSet add(String name, Closure configureClosure)

  Adds a source set with the given name. The given configuration closure is executed against the source set before it is returned from this method.
  throws:
    InvalidUserDataException when a source set with the given name already exists in this container.
  deprecated:
    use create(String, groovy.lang.Closure) instead
  Parameters:
    `name` - The name of the new source set.
    `configureClosure` - The closure to use to configure the source set.
  Returns:
    The newly added source set.

Gradle API 1.10