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

## org.gradle.api.tasks.compile
[Java] Class GroovyCompile

    java.lang.Object
      org.gradle.api.internal.ConventionTask
          org.gradle.api.tasks.SourceTask
              org.gradle.api.tasks.compile.AbstractCompile
                  org.gradle.api.tasks.compile.GroovyCompile

    public class GroovyCompile
    extends AbstractCompile

Compiles Groovy source files, and optionally, Java source files.

Authors:
  Hans Dockter

Constructor Summary
`GroovyCompile()`

Method Summary
`protected void` | `compile()`
`GroovyJavaJointCompiler` | `getCompiler()`
`FileCollection` | `getGroovyClasspath()` Returns the classpath containing the version of Groovy to use for compilation.
`GroovyCompileOptions` | `getGroovyOptions()` Gets the options for the Groovy compilation.
`CompileOptions` | `getOptions()` Returns the options for Java compilation.
`void` | `setCompiler(GroovyJavaJointCompiler compiler)`
`void` | `setGroovyClasspath(FileCollection groovyClasspath)` Sets the classpath containing the version of Groovy to use for compilation.

Methods inherited from class AbstractCompile
compile, getClasspath, getDestinationDir, getSourceCompatibility, getTargetCompatibility, setClasspath, setDestinationDir, setSourceCompatibility, setTargetCompatibility

Methods inherited from class SourceTask
exclude, exclude, exclude, exclude, getDefaultSource, getExcludes, getIncludes, getSource, include, include, include, include, setExcludes, setIncludes, setSource, source

Constructor Detail

### GroovyCompile

    public GroovyCompile()

Method Detail

### compile

    protected void compile()

### getCompiler

    public GroovyJavaJointCompiler getCompiler()

### getGroovyClasspath

    @InputFiles
    public FileCollection getGroovyClasspath()

  Returns the classpath containing the version of Groovy to use for compilation.
  Returns:
    The classpath.

### getGroovyOptions

    @Nested
    public GroovyCompileOptions getGroovyOptions()

  Gets the options for the Groovy compilation. To set specific options for the nested Java compilation, use getOptions().
  Returns:
    The Groovy compile options. Never returns null.

### getOptions

    @Nested
    public CompileOptions getOptions()

  Returns the options for Java compilation.
  Returns:
    The java compile options. Never returns null.

### setCompiler

    public void setCompiler(GroovyJavaJointCompiler compiler)

### setGroovyClasspath

    public void setGroovyClasspath(FileCollection groovyClasspath)

  Sets the classpath containing the version of Groovy to use for compilation.
  Parameters:
    `groovyClasspath` - The classpath. Must not be null.

Groovy Documentation