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

- - ### Method Detail

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