Groovy Documentation

org.gradle.api.tasks
Interface SourceSetContainer

org.gradle.api.DomainObjectContainer
  org.gradle.api.tasks.SourceSetContainer
      org.gradle.api.DomainObjectCollection
All Superinterfaces:
DomainObjectContainer, DomainObjectCollection

interface SourceSetContainer
extends DomainObjectContainer

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, Closure configureClosure)

Adds a source set with the given name.

 
Methods inherited from interface DomainObjectContainer
addRule, getRules
 
Methods inherited from interface DomainObjectCollection
allObjects, allObjects, findAll, findByName, getAll, getAsMap, getAt, getByName, getByName, matching, whenObjectAdded, whenObjectAdded, whenObjectRemoved, withType
 
Methods inherited from interface java.lang.Iterable
iterator
 
Methods inherited from class java.lang.Object
wait, wait, wait, hashCode, getClass, equals, toString, notify, notifyAll
 

Method Detail

add

public SourceSet add(java.lang.String name)
Adds a source set with the given name.
param:
name The name of the new source set.
return:
The newly added source set.
throws:
org.gradle.api.InvalidUserDataException when a source set with the given name already exists in this container.


add

public SourceSet add(java.lang.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.
param:
name The name of the new source set.
param:
configureClosure The closure to use to configure the source set.
return:
The newly added source set.
throws:
InvalidUserDataException when a source set with the given name already exists in this container.


 

Groovy Documentation