Package: org.gradle.api.tasks.compile

## [Java] Class GroovyCompile

- org.gradle.api.tasks.compile.GroovyCompile

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

- - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `protected void` | `compile()`
    `Compiler<GroovyJavaJointCompileSpec>` | `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(Compiler<GroovyJavaJointCompileSpec> compiler)`
    `void` | `setGroovyClasspath(FileCollection groovyClasspath)` Sets the classpath containing the version of Groovy to use for compilation.

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class AbstractCompile` | `compile, getClasspath, getDestinationDir, getSourceCompatibility, getTargetCompatibility, setClasspath, setDestinationDir, setSourceCompatibility, setTargetCompatibility`

- - ### Method Detail

    - #### @TaskAction protected void compile()

    - #### public Compiler<GroovyJavaJointCompileSpec> getCompiler()

    - #### @InputFiles public FileCollection getGroovyClasspath()

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

      Returns:
        The classpath.

    - #### @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.

    - #### @Nested public CompileOptions getOptions()

      Returns the options for Java compilation.

      Returns:
        The Java compile options. Never returns null.

    - #### public void setCompiler(Compiler<GroovyJavaJointCompileSpec> compiler)

    - #### 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.