Package: org.gradle.api.tasks.compile

## [Java] Class GroovyCompile

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

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

- - Inherited fields
    Fields inherited from class | Fields
    --- | ---
    `class SourceTask` | `TASK_NAME, TASK_DESCRIPTION, TASK_GROUP, TASK_TYPE, TASK_DEPENDS_ON, TASK_OVERWRITE, TASK_ACTION`

  - ### Methods Summary

    Methods
    Type | Name and description
    --- | ---
    `protected void` | `compile()`
    `Compiler<org.gradle.api.internal.tasks.compile.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<org.gradle.api.internal.tasks.compile.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`
    `class SourceTask` | `source, getSource, getIncludes, setIncludes, setIncludes, include, include, include, include, include, include, include, include, getExcludes, setExcludes, setExcludes, exclude, exclude, exclude, exclude, exclude, exclude, exclude, exclude, setSource, conventionMapping, conventionMapping, getConventionMapping, setProperty, toString, compareTo, compareTo, getName, getActions, setName, getState, getState, getLogger, getPath, getExtensions, configure, configure, getDescription, property, getStandardOutputCapture, getOutputs, getOutputs, deleteAllActions, getEnabled, getAnt, getLogging, getLogging, hasProperty, getConvention, setDescription, getGroup, setGroup, dependsOnTaskDidWork, getInputs, getTemporaryDir, mustRunAfter, setMustRunAfter, getMustRunAfter, finalizedBy, setFinalizedBy, getFinalizedBy, shouldRunAfter, setShouldRunAfter, getShouldRunAfter, getProject, setActions, getTaskDependencies, getTaskDependencies, getDependsOn, setDependsOn, dependsOn, onlyIf, onlyIf, setOnlyIf, setOnlyIf, setDidWork, getDidWork, doFirst, doFirst, doLast, doLast, getAsDynamicObject, prependParallelSafeAction, injectIntoNewInstance, getTaskActions, getOnlyIf, getImpliesSubProjects, setImpliesSubProjects, getExecuter, setExecuter, getTemporaryDirFactory, addValidator, getValidators, appendParallelSafeAction, isHasCustomActions, execute, isEnabled, setEnabled, leftShift, setProject, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll`

- - ### Method Detail

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

    - #### public Compiler<org.gradle.api.internal.tasks.compile.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<org.gradle.api.internal.tasks.compile.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.