JavaCompile (Gradle API 2.14.1)

Package: org.gradle.api.tasks.compile

## [Java] Class JavaCompile

- org.gradle.api.tasks.compile.JavaCompile

- Compiles Java source files.

           apply plugin: 'java'
           compileJava {
               //enable compilation in a separate daemon process
               options.fork = true

               //enable incremental compilation
               options.incremental = true
           }

- - 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(IncrementalTaskInputs inputs)`
    `protected void` | `compile()`
    `protected org.gradle.internal.Factory<AntBuilder>` | `getAntBuilderFactory()`
    `protected org.gradle.cache.CacheRepository` | `getCacheRepository()`
    `File` | `getDependencyCacheDir()`
    `protected org.gradle.api.internal.file.FileOperations` | `getFileOperations()`
    `protected org.gradle.api.internal.tasks.compile.incremental.cache.GeneralCompileCaches` | `getGeneralCompileCaches()`
    `CompileOptions` | `getOptions()` Returns the compilation options.
    `protected JavaPlatform` | `getPlatform()`
    `JavaToolChain` | `getToolChain()` Returns the tool chain that will be used to compile the Java source.
    `void` | `setDependencyCacheDir(File dependencyCacheDir)`
    `void` | `setToolChain(JavaToolChain toolChain)` Sets the tool chain that should be used to compile the Java source.

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

- - ### Method Detail

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

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

    - #### @javax.inject.Inject protected org.gradle.internal.Factory<AntBuilder> getAntBuilderFactory()

    - #### @javax.inject.Inject protected org.gradle.cache.CacheRepository getCacheRepository()

    - #### @OutputDirectory public File getDependencyCacheDir()

    - #### @javax.inject.Inject protected org.gradle.api.internal.file.FileOperations getFileOperations()

    - #### @javax.inject.Inject protected org.gradle.api.internal.tasks.compile.incremental.cache.GeneralCompileCaches getGeneralCompileCaches()

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

      Returns the compilation options.

      Returns:
        The compilation options.

    - #### protected JavaPlatform getPlatform()

    - #### @Incubating @javax.inject.Inject public JavaToolChain getToolChain()

      Returns the tool chain that will be used to compile the Java source.

      Returns:
        The tool chain.

    - #### public void setDependencyCacheDir(File dependencyCacheDir)

    - #### @Incubating public void setToolChain(JavaToolChain toolChain)

      Sets the tool chain that should be used to compile the Java source.

      Parameters:
        `toolChain` - The tool chain.