api / org.gradle.api.tasks.scala / ScalaCompile

ScalaCompile

@CacheableTask open class ScalaCompile : AbstractScalaCompile

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

Constructors

<init>

ScalaCompile()

Functions

getScalaClasspath

open fun getScalaClasspath(): FileCollection

Returns the classpath to use to load the Scala compiler.

getScalaCompileOptions

open fun getScalaCompileOptions(): ScalaCompileOptions

getZincClasspath

open fun getZincClasspath(): FileCollection

Returns the classpath to use to load the Zinc incremental compiler. This compiler in turn loads the Scala compiler.

setCompiler

open fun setCompiler(compiler: Compiler): Unit

For testing only.

setScalaClasspath

open fun setScalaClasspath(scalaClasspath: FileCollection): Unit

setZincClasspath

open fun setZincClasspath(zincClasspath: FileCollection): Unit

Inherited 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.

getSource

open fun getSource(): FileTree

{@inheritDoc}