Comparable<Task>
, org.gradle.api.internal.DynamicObjectAware
, org.gradle.api.internal.IConventionAware
, org.gradle.api.internal.TaskInternal
, org.gradle.api.internal.tasks.compile.HasCompileOptions
, ExtensionAware
, Task
, PatternFilterable
, org.gradle.util.Configurable<Task>
PlatformJavaCompile
@CacheableTask public class JavaCompile extends AbstractCompile implements org.gradle.api.internal.tasks.compile.HasCompileOptions
plugins { id 'java' } tasks.withType(JavaCompile) { //enable compilation in a separate daemon process options.fork = true }
Task.Namer
TASK_ACTION, TASK_CONSTRUCTOR_ARGS, TASK_DEPENDS_ON, TASK_DESCRIPTION, TASK_GROUP, TASK_NAME, TASK_OVERWRITE, TASK_TYPE
Constructor | Description |
---|---|
JavaCompile() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
compile(IncrementalTaskInputs inputs) |
Deprecated.
Left for backwards compatibility.
|
protected void |
compile(InputChanges inputs) |
Compile the sources, taking into account the changes reported by inputs.
|
FileCollection |
getClasspath() |
Returns the classpath to use to compile the source files.
|
protected org.gradle.internal.file.Deleter |
getDeleter() |
|
protected org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilerFactory |
getIncrementalCompilerFactory() |
|
Property<JavaCompiler> |
getJavaCompiler() |
Configures the java compiler to be used to compile the Java source.
|
protected org.gradle.internal.jvm.JavaModuleDetector |
getJavaModuleDetector() |
|
protected org.gradle.api.internal.tasks.JavaToolChainFactory |
getJavaToolChainFactory() |
|
ModularitySpec |
getModularity() |
Returns the module path handling of this compile task.
|
CompileOptions |
getOptions() |
Returns the compilation options.
|
protected JavaPlatform |
getPlatform() |
Deprecated.
|
protected ProjectLayout |
getProjectLayout() |
|
FileTree |
getSource() |
Returns the source for this task, after the include and exclude patterns have been applied.
|
protected File |
getSourceClassesMappingFile() |
The Groovy source-classes mapping file.
|
protected FileTree |
getSources() |
Deprecated.
|
protected FileCollection |
getStableSources() |
The sources for incremental change detection.
|
JavaToolChain |
getToolChain() |
Deprecated.
|
void |
setToolChain(JavaToolChain toolChain) |
Deprecated.
|
getDestinationDir, getDestinationDirectory, getSourceCompatibility, getTargetCompatibility, setClasspath, setDestinationDir, setDestinationDir, setSourceCompatibility, setTargetCompatibility
exclude, exclude, exclude, exclude, getExcludes, getIncludes, getPatternSetFactory, include, include, include, include, setExcludes, setIncludes, setSource, setSource, source
conventionMapping, conventionMapping, getConventionMapping
compareTo, configure, dependsOn, doFirst, doFirst, doFirst, doLast, doLast, doLast, finalizedBy, getActions, getAnt, getDependsOn, getDescription, getDestroyables, getDidWork, getEnabled, getExtensions, getFinalizedBy, getGroup, getInputs, getLocalState, getLogger, getLogging, getMustRunAfter, getName, getOutputs, getPath, getProject, getShouldRunAfter, getState, getTaskDependencies, getTemporaryDir, getTimeout, hasProperty, mustRunAfter, onlyIf, onlyIf, property, setActions, setDependsOn, setDescription, setDidWork, setEnabled, setFinalizedBy, setGroup, setMustRunAfter, setOnlyIf, setOnlyIf, setProperty, setShouldRunAfter, shouldRunAfter, usesService
appendParallelSafeAction, getAsDynamicObject, getConvention, getIdentityPath, getImpliesSubProjects, getOnlyIf, getRequiredServices, getServices, getSharedResources, getStandardOutputCapture, getTaskActions, getTaskIdentity, getTemporaryDirFactory, hasTaskActions, injectIntoNewInstance, isEnabled, isHasCustomActions, prependParallelSafeAction, setImpliesSubProjects, setLoggerMessageRewriter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getConvention
@ReplacedBy("stableSources") public FileTree getSource()
The PathSensitivity
for the sources is configured to be PathSensitivity.ABSOLUTE
.
If your sources are less strict, please change it accordingly by overriding this method in your subclass.
getSource
in class SourceTask
@Deprecated @Internal protected FileTree getSources()
@Deprecated public JavaToolChain getToolChain()
@Deprecated public void setToolChain(JavaToolChain toolChain)
toolChain
- The tool chain.@Incubating @Optional public Property<JavaCompiler> getJavaCompiler()
JavaToolchainSpec
@Deprecated protected void compile(IncrementalTaskInputs inputs)
@Incubating protected void compile(InputChanges inputs)
@Inject protected org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilerFactory getIncrementalCompilerFactory()
@Inject protected org.gradle.internal.jvm.JavaModuleDetector getJavaModuleDetector()
@Inject protected org.gradle.api.internal.tasks.JavaToolChainFactory getJavaToolChainFactory()
@Inject protected org.gradle.internal.file.Deleter getDeleter()
@Inject protected ProjectLayout getProjectLayout()
@Deprecated protected JavaPlatform getPlatform()
@LocalState @Incubating protected File getSourceClassesMappingFile()
@Incubating public ModularitySpec getModularity()
public CompileOptions getOptions()
getOptions
in interface org.gradle.api.internal.tasks.compile.HasCompileOptions
@CompileClasspath @Incremental public FileCollection getClasspath()
AbstractCompile
getClasspath
in class AbstractCompile
@Incubating @SkipWhenEmpty @IgnoreEmptyDirectories @PathSensitive(RELATIVE) @InputFiles protected FileCollection getStableSources()