api / org.gradle.language.scala.tasks / AbstractScalaCompile

AbstractScalaCompile

@Incubating abstract class AbstractScalaCompile : AbstractCompile

An abstract Scala compile task sharing common functionality for compiling scala.

Functions

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 Java compilation options.

getScalaCompileOptions

open fun getScalaCompileOptions(): BaseScalaCompileOptions

Returns the Scala compilation options.

getSource

open fun getSource(): FileTree

{@inheritDoc}

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.

Inheritors

PlatformScalaCompile

open class PlatformScalaCompile : AbstractScalaCompile

A platform-aware Scala compile task.

ScalaCompile

open class ScalaCompile : AbstractScalaCompile

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