api / org.gradle.api.tasks.compile / GroovyCompile

GroovyCompile

@CacheableTask open class GroovyCompile : AbstractCompile

Compiles Groovy source files, and optionally, Java source files.

Constructors

<init>

GroovyCompile()

Functions

getCompiler

open fun getCompiler(): Compiler

getGroovyClasspath

open fun getGroovyClasspath(): FileCollection

Returns the classpath containing the version of Groovy to use for compilation.

getGroovyOptions

open fun getGroovyOptions(): GroovyCompileOptions

Gets the options for the Groovy compilation. To set specific options for the nested Java compilation, use .

getOptions

open fun getOptions(): CompileOptions

Returns the options for Java compilation.

getSource

open fun getSource(): FileTree

{@inheritDoc}

setCompiler

open fun setCompiler(compiler: Compiler): Unit

setGroovyClasspath

open fun setGroovyClasspath(groovyClasspath: FileCollection): Unit

Sets the classpath containing the version of Groovy to use for compilation.

Inherited Functions

getClasspath

open fun getClasspath(): FileCollection

Returns the classpath to use to compile the source files.

getDestinationDir

open fun getDestinationDir(): File

Returns the directory to generate the .class files into.

getSourceCompatibility

open fun getSourceCompatibility(): String

Returns the Java language level to use to compile the source files.

getTargetCompatibility

open fun getTargetCompatibility(): String

Returns the target JVM to generate the .class files for.

setClasspath

open fun setClasspath(configuration: FileCollection): Unit

Sets the classpath to use to compile the source files.

setDestinationDir

open fun setDestinationDir(destinationDir: File): Unit
open fun setDestinationDir(destinationDir: Provider<File>): Unit

Sets the directory to generate the .class files into.

setSourceCompatibility

open fun setSourceCompatibility(sourceCompatibility: String): Unit

Sets the Java language level to use to compile the source files.

setTargetCompatibility

open fun setTargetCompatibility(targetCompatibility: String): Unit

Sets the target JVM to generate the .class files for.