Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.gradle.api.tasks
Interface SourceSet

    public interface SourceSet

A `SourceSet` represents a logical group of Java source and resources.

Field Summary
`static String` | `MAIN_SOURCE_SET_NAME` The name of the main source set.
`static String` | `TEST_SOURCE_SET_NAME` The name of the test source set.

Method Summary
`SourceSet` | `compiledBy(Object... taskPaths)` Registers a set of tasks which are responsible for compiling this source set into the classes directory.
`FileTree` | `getAllJava()` All Java source files for this source set.
`FileTree` | `getAllSource()` All source files for this source set.
`FileCollection` | `getClasses()` Returns the compiled classes directory for this source set.
`File` | `getClassesDir()` Returns the directory to assemble the compiled classes into.
`String` | `getClassesTaskName()` Returns the name of the classes task for this source set.
`FileCollection` | `getCompileClasspath()` Returns the classpath used to compile this source.
`String` | `getCompileJavaTaskName()` Returns the name of the compile Java task for this source set.
`String` | `getCompileTaskName(String language)` Returns the name of a compile task for this source set.
`SourceDirectorySet` | `getJava()` Returns the Java source which is to be compiled by the Java compiler into the class output directory.
`String` | `getName()` Returns the name of this source set.
`String` | `getProcessResourcesTaskName()` Returns the name of the resource process task for this source set.
`SourceDirectorySet` | `getResources()` Returns the non-Java resources which are to be copied into the class output directory.
`FileCollection` | `getRuntimeClasspath()` Returns the classpath used to execute this source.
`String` | `getTaskName(String verb, String target)` Returns the name of a task for this source set.
`SourceSet` | `java(Closure configureClosure)` Configures the Java source for this set.
`SourceSet` | `resources(Closure configureClosure)` Configures the non-Java resources for this set.
`void` | `setClassesDir(File classesDir)` Sets the directory to assemble the compiled classes into.
`void` | `setCompileClasspath(FileCollection classpath)` Sets the classpath used to compile this source.
`void` | `setRuntimeClasspath(FileCollection classpath)` Sets the classpath used to execute this source.

Field Detail

### MAIN_SOURCE_SET_NAME

    static final String MAIN_SOURCE_SET_NAME

  The name of the main source set.

  See Also:
    Constant Field Values

### TEST_SOURCE_SET_NAME

    static final String TEST_SOURCE_SET_NAME

  The name of the test source set.

  See Also:
    Constant Field Values

Method Detail

### getName

    String getName()

  Returns the name of this source set.

  Returns:
    The name. Never returns null.

### getCompileClasspath

    FileCollection getCompileClasspath()

  Returns the classpath used to compile this source.

  Returns:
    The classpath. Never returns null.

### setCompileClasspath

    void setCompileClasspath(FileCollection classpath)

  Sets the classpath used to compile this source.

  Parameters:
    `classpath` - The classpath. Should not be null.

### getRuntimeClasspath

    FileCollection getRuntimeClasspath()

  Returns the classpath used to execute this source.

  Returns:
    The classpath. Never returns null.

### setRuntimeClasspath

    void setRuntimeClasspath(FileCollection classpath)

  Sets the classpath used to execute this source.

  Parameters:
    `classpath` - The classpath. Should not be null.

### getClassesDir

    File getClassesDir()

  Returns the directory to assemble the compiled classes into.

  Returns:
    The classes dir. Never returns null.

### setClassesDir

    void setClassesDir(File classesDir)

  Sets the directory to assemble the compiled classes into.

  Parameters:
    `classesDir` - the classes dir. Should not be null.

### getClasses

    FileCollection getClasses()

  Returns the compiled classes directory for this source set.

  Returns:
    The classes dir, as a `FileCollection`.

### compiledBy

    SourceSet compiledBy(Object... taskPaths)

  Registers a set of tasks which are responsible for compiling this source set into the classes directory. The paths are evaluated as for `Task.dependsOn(Object...)`.

  Parameters:
    `taskPaths` - The tasks which compile this source set.
  Returns:
    this

### getResources

    SourceDirectorySet getResources()

  Returns the non-Java resources which are to be copied into the class output directory.

  Returns:
    the resources. Never returns null.

### resources

    SourceSet resources(Closure configureClosure)

  Configures the non-Java resources for this set.

  The given closure is used to configure the `SourceDirectorySet` which contains the resources.

  Parameters:
    `configureClosure` - The closure to use to configure the resources.
  Returns:
    this

### getJava

    SourceDirectorySet getJava()

  Returns the Java source which is to be compiled by the Java compiler into the class output directory.

  Returns:
    the Java source. Never returns null.

### java

    SourceSet java(Closure configureClosure)

  Configures the Java source for this set.

  The given closure is used to configure the `SourceDirectorySet` which contains the Java source.

  Parameters:
    `configureClosure` - The closure to use to configure the Java source.
  Returns:
    this

### getAllJava

    FileTree getAllJava()

  All Java source files for this source set. This includes, for example, source which is directly compiled, and source which is indirectly compiled through joint compilation.

  Returns:
    the Java source. Never returns null.

### getAllSource

    FileTree getAllSource()

  All source files for this source set.

  Returns:
    the source. Never returns null.

### getClassesTaskName

    String getClassesTaskName()

  Returns the name of the classes task for this source set.

  Returns:
    The task name. Never returns null.

### getProcessResourcesTaskName

    String getProcessResourcesTaskName()

  Returns the name of the resource process task for this source set.

  Returns:
    The task name. Never returns null.

### getCompileJavaTaskName

    String getCompileJavaTaskName()

  Returns the name of the compile Java task for this source set.

  Returns:
    The task name. Never returns null.

### getCompileTaskName

    String getCompileTaskName(String language)

  Returns the name of a compile task for this source set.

  Parameters:
    `language` - The language to be compiled.
  Returns:
    The task name. Never returns null.

### getTaskName

    String getTaskName(String verb,
                       String target)

  Returns the name of a task for this source set.

  Parameters:
    `verb` - The action, may be null.
    `target` - The target, may be null
  Returns:
    The task name, generally of the form ${verb}${name}${noun}

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD