org.gradle.api.tasks
Interface SourceSetContainer
- All Superinterfaces:
- DomainObjectCollection<SourceSet>, Iterable<SourceSet>, NamedDomainObjectCollection<SourceSet>, NamedDomainObjectContainer<SourceSet>
public interface SourceSetContainer
- extends NamedDomainObjectContainer<SourceSet>, NamedDomainObjectCollection<SourceSet>
A SourceSetContainer manages a set of SourceSet objects.
| Methods inherited from interface org.gradle.api.DomainObjectCollection |
all, all, allObjects, allObjects, findAll, getAll, whenObjectAdded, whenObjectAdded, whenObjectRemoved, withType, withType |
add
SourceSet add(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(String name,
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.