- Gradle java compile tasks
- Class JavaCompile
- Nested Class Summary
- Nested classes/interfaces inherited from interface org.gradle.api.Task
- Field Summary
- Fields inherited from interface org.gradle.api.Task
- Constructor Summary
- Method Summary
- Methods inherited from class org.gradle.api.tasks.compile.AbstractCompile
- Methods inherited from class org.gradle.api.tasks.SourceTask
- Methods inherited from class org.gradle.api.internal.ConventionTask
- Methods inherited from class org.gradle.api.DefaultTask
- Methods inherited from class org.gradle.api.internal.AbstractTask
- Methods inherited from class java.lang.Object
- Methods inherited from interface org.gradle.api.Task
- Constructor Detail
- JavaCompile
- Method Detail
- getSource
- getJavaCompiler
- compile
- getPreviousCompilationData
- getModularity
- getOptions
- getClasspath
- getStableSources
- getObjectFactory
- getJavaToolchainService
- getProviderFactory
- getIncrementalCompilerFactory
- getJavaModuleDetector
- getDeleter
- getProjectLayout
- JavaCompile
- Methods
Gradle java compile tasks
Class JavaCompile
- java.lang.Object
-
- org.gradle.api.internal.AbstractTask
-
- org.gradle.api.DefaultTask
-
- org.gradle.api.internal.ConventionTask
-
- org.gradle.api.tasks.SourceTask
-
- org.gradle.api.tasks.compile.AbstractCompile
-
- org.gradle.api.tasks.compile.JavaCompile
- All Implemented Interfaces: java.lang.Comparable , 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 , Configurable
@CacheableTask public abstract class JavaCompile extends AbstractCompile implements org.gradle.api.internal.tasks.compile.HasCompileOptions
plugins < id 'java' >tasks.withType(JavaCompile).configureEach < //enable compilation in a separate daemon process options.fork = true >
Nested Class Summary
Nested classes/interfaces inherited from interface org.gradle.api.Task
Field Summary
Fields inherited from interface org.gradle.api.Task
Constructor Summary
Method Summary
Methods inherited from class org.gradle.api.tasks.compile.AbstractCompile
Methods inherited from class org.gradle.api.tasks.SourceTask
Methods inherited from class org.gradle.api.internal.ConventionTask
Methods inherited from class org.gradle.api.DefaultTask
Methods inherited from class org.gradle.api.internal.AbstractTask
Methods inherited from class java.lang.Object
Methods inherited from interface org.gradle.api.Task
Constructor Detail
JavaCompile
Method Detail
getSource
@Internal("tracked via stableSources") public FileTree getSource()
Returns the source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist. 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.
getJavaCompiler
public PropertyJavaCompiler> getJavaCompiler()
compile
getPreviousCompilationData
@OutputFile protected java.io.File getPreviousCompilationData()
getModularity
getOptions
getClasspath
@CompileClasspath @Incremental public FileCollection getClasspath()
getStableSources
@SkipWhenEmpty @IgnoreEmptyDirectories @NormalizeLineEndings @PathSensitive(RELATIVE) @InputFiles protected FileCollection getStableSources()
getObjectFactory
getJavaToolchainService
getProviderFactory
getIncrementalCompilerFactory
@Inject protected org.gradle.api.internal.tasks.compile.incremental.IncrementalCompilerFactory getIncrementalCompilerFactory()
getJavaModuleDetector
@Inject protected org.gradle.internal.jvm.JavaModuleDetector getJavaModuleDetector()
getDeleter
@Inject protected org.gradle.internal.file.Deleter getDeleter()
getProjectLayout
JavaCompile
The directory property that represents the directory to generate the .class files into.
The set of exclude patterns.
The set of include patterns.
Configures the java compiler to be used to compile the Java source.
The module path handling of this compile task.
The source for this task, after the include and exclude patterns have been applied. Ignores source files which do not exist.
The Java language level to use to compile the source files.
The target JVM to generate the .class files for.
Methods
Adds an exclude spec. This method may be called multiple times to append new specs.The given closure is passed a FileTreeElement as its parameter. The closure should return true or false. Example:
Adds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed.
Adds an ANT style exclude pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed.
Adds an exclude spec. This method may be called multiple times to append new specs. If excludes are not provided, then no files will be excluded. If excludes are provided, then files must not match any exclude pattern to be processed.
Adds an include spec. This method may be called multiple times to append new specs. The given closure is passed a FileTreeElement as its parameter. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns or specs to be included.
Adds an ANT style include pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns to be processed.
Adds an ANT style include pattern. This method may be called multiple times to append new patterns and multiple patterns may be specified in a single call. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns to be processed.
Adds an include spec. This method may be called multiple times to append new specs. If includes are not provided, then all files in this container will be included. If includes are provided, then a file must match at least one of the include patterns or specs to be included.
Adds some source to this task. The given source objects will be evaluated as per Project.files(java.lang.Object[]) .