org.gradle.api.tasks
Interface SourceSetContainer
- All Superinterfaces:
- DomainObjectCollection<SourceSet>, DomainObjectContainer<SourceSet>, java.lang.Iterable<SourceSet>
public interface SourceSetContainer
- extends DomainObjectContainer<SourceSet>
A SourceSetContainer
manages a set of SourceSet
objects.
Method Summary |
SourceSet |
add(java.lang.String name)
Adds a source set with the given name. |
SourceSet |
add(java.lang.String name,
groovy.lang.Closure configureClosure)
Adds a source set with the given name. |
Methods inherited from interface org.gradle.api.DomainObjectCollection |
allObjects, allObjects, findAll, findByName, getAll, getAsMap, getAt, getByName, getByName, matching, whenObjectAdded, whenObjectAdded, whenObjectRemoved, withType |
Methods inherited from interface java.lang.Iterable |
iterator |
add
SourceSet add(java.lang.String name)
throws InvalidUserDataException
- Adds a source set with the given name.
- Parameters:
name
- The name of the new source set.
- Returns:
- The newly added source set.
- Throws:
InvalidUserDataException
- when a source set with the given name already exists in this container.
add
SourceSet add(java.lang.String name,
groovy.lang.Closure configureClosure)
throws InvalidUserDataException
- 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.
- 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.
- Throws:
InvalidUserDataException
- when a source set with the given name already exists in this container.