api / org.gradle.language.java.tasks / PlatformJavaCompile

PlatformJavaCompile

@Incubating open class PlatformJavaCompile : JavaCompile

A platform-aware Java compile task.

Constructors

<init>

PlatformJavaCompile()

A platform-aware Java compile task.

Functions

getPlatform

open fun getPlatform(): JavaPlatform

setPlatform

open fun setPlatform(platform: JavaPlatform): Unit

Inherited Functions

getClasspath

open fun getClasspath(): FileCollection

getEffectiveAnnotationProcessorPath

open fun getEffectiveAnnotationProcessorPath(): FileCollection

Returns the path to use for annotation processor discovery. Returns an empty collection when no processing should be performed, for example when no annotation processors are present in the compile classpath or annotation processing has been disabled.

You can specify this path using CompileOptions#setAnnotationProcessorPath(FileCollection) or CompileOptions#setCompilerArgs(java.util.List). When not explicitly set using one of the methods on CompileOptions, the compile classpath will be used when there are annotation processors present in the compile classpath. Otherwise this path will be empty.

This path is always empty when annotation processing is disabled.

getOptions

open fun getOptions(): CompileOptions

Returns the compilation options.

getSource

open fun getSource(): FileTree

{@inheritDoc}

getToolChain

open fun getToolChain(): JavaToolChain

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

setToolChain

open fun setToolChain(toolChain: JavaToolChain): Unit

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