org.gradle.api.tasks.scala

## Class ScalaCompileOptions

- java.lang.Object
- - org.gradle.api.tasks.compile.AbstractOptions
  - - org.gradle.api.tasks.scala.ScalaCompileOptions

- All Implemented Interfaces:
    Serializable

      public class ScalaCompileOptions
      extends AbstractOptions

  Options for Scala compilation.
  See Also:
    Serialized Form

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `ScalaCompileOptions()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected boolean` | `excludeFromAntProperties(String fieldName)`
    `List<String>` | `getAdditionalParameters()` Additional parameters passed to the compiler.
    `protected String` | `getAntPropertyName(String fieldName)`
    `protected Object` | `getAntPropertyValue(String fieldName, Object value)`
    `String` | `getDaemonServer()` Server (host:port) on which the compile daemon is running.
    `String` | `getDebugLevel()` Generate debugging information.
    `String` | `getEncoding()` Encoding of source files.
    `String` | `getForce()` Whether to force the compilation of all files.
    `ScalaForkOptions` | `getForkOptions()` Options for running the Scala compiler in a separate process.
    `IncrementalCompileOptions` | `getIncrementalOptions()`
    `String` | `getLoggingLevel()` Specifies the amount of logging.
    `List<String>` | `getLoggingPhases()` Phases of the compiler to log.
    `boolean` | `isDeprecation()` Generate deprecation information.
    `boolean` | `isFailOnError()` Fail the build on compilation errors.
    `boolean` | `isFork()` Whether to run the Scala compiler in a separate process.
    `boolean` | `isListFiles()` List files to be compiled.
    `boolean` | `isOptimize()` Run optimizations.
    `boolean` | `isUnchecked()` Generate unchecked information.
    `boolean` | `isUseAnt()` Tells whether to use Ant for compilation.
    `boolean` | `isUseCompileDaemon()` Whether to use the fsc compile daemon.
    `void` | `setAdditionalParameters(List<String> additionalParameters)`
    `void` | `setDaemonServer(String daemonServer)`
    `void` | `setDebugLevel(String debugLevel)`
    `void` | `setDeprecation(boolean deprecation)`
    `void` | `setEncoding(String encoding)`
    `void` | `setFailOnError(boolean failOnError)`
    `void` | `setForce(String force)`
    `void` | `setFork(boolean fork)`
    `void` | `setForkOptions(ScalaForkOptions forkOptions)`
    `void` | `setIncrementalOptions(IncrementalCompileOptions incrementalOptions)`
    `void` | `setListFiles(boolean listFiles)`
    `void` | `setLoggingLevel(String loggingLevel)`
    `void` | `setLoggingPhases(List<String> loggingPhases)`
    `void` | `setOptimize(boolean optimize)`
    `void` | `setUnchecked(boolean unchecked)`
    `void` | `setUseAnt(boolean useAnt)`
    `void` | `setUseCompileDaemon(boolean useCompileDaemon)`

    - ### Methods inherited from class org.gradle.api.tasks.compile.AbstractOptions

      `define, optionMap`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### ScalaCompileOptions

          public ScalaCompileOptions()

  - ### Method Detail

    - #### isUseCompileDaemon

          public boolean isUseCompileDaemon()

      Whether to use the fsc compile daemon.

    - #### setUseCompileDaemon

          public void setUseCompileDaemon(boolean useCompileDaemon)

    - #### getDaemonServer

          public String getDaemonServer()

      Server (host:port) on which the compile daemon is running. The host must share disk access with the client process. If not specified, launches the daemon on the localhost. This parameter can only be specified if useCompileDaemon is true.

    - #### setDaemonServer

          public void setDaemonServer(String daemonServer)

    - #### isFailOnError

          public boolean isFailOnError()

      Fail the build on compilation errors.

    - #### setFailOnError

          public void setFailOnError(boolean failOnError)

    - #### isDeprecation

          public boolean isDeprecation()

      Generate deprecation information.

    - #### setDeprecation

          public void setDeprecation(boolean deprecation)

    - #### isUnchecked

          public boolean isUnchecked()

      Generate unchecked information.

    - #### setUnchecked

          public void setUnchecked(boolean unchecked)

    - #### getDebugLevel

          @Input
          @Optional
          public String getDebugLevel()

      Generate debugging information. Legal values: none, source, line, vars, notailcalls

    - #### setDebugLevel

          public void setDebugLevel(String debugLevel)

    - #### isOptimize

          @Input
          public boolean isOptimize()

      Run optimizations.

    - #### setOptimize

          public void setOptimize(boolean optimize)

    - #### getEncoding

          @Input
          @Optional
          public String getEncoding()

      Encoding of source files.

    - #### setEncoding

          public void setEncoding(String encoding)

    - #### getForce

          public String getForce()

      Whether to force the compilation of all files. Legal values: - never (only compile modified files) - changed (compile all files when at least one file is modified) - always (always recompile all files)

    - #### setForce

          public void setForce(String force)

    - #### getAdditionalParameters

          public List<String> getAdditionalParameters()

      Additional parameters passed to the compiler. Each parameter must start with '-'.

    - #### setAdditionalParameters

          public void setAdditionalParameters(List<String> additionalParameters)

    - #### isListFiles

          public boolean isListFiles()

      List files to be compiled.

    - #### setListFiles

          public void setListFiles(boolean listFiles)

    - #### getLoggingLevel

          public String getLoggingLevel()

      Specifies the amount of logging. Legal values: none, verbose, debug

    - #### setLoggingLevel

          public void setLoggingLevel(String loggingLevel)

    - #### getLoggingPhases

          public List<String> getLoggingPhases()

      Phases of the compiler to log. Legal values: namer, typer, pickler, uncurry, tailcalls, transmatch, explicitouter, erasure, lambdalift, flatten, constructors, mixin, icode, jvm, terminal.

    - #### setLoggingPhases

          public void setLoggingPhases(List<String> loggingPhases)

    - #### isFork

          public boolean isFork()

      Whether to run the Scala compiler in a separate process. Defaults to `false` for the Ant based compiler (`useAnt = true`), and to `true` for the Zinc based compiler (`useAnt = false`).

    - #### setFork

          public void setFork(boolean fork)

    - #### getForkOptions

          public ScalaForkOptions getForkOptions()

      Options for running the Scala compiler in a separate process. These options only take effect if `fork` is set to `true`.

    - #### setForkOptions

          public void setForkOptions(ScalaForkOptions forkOptions)

    - #### isUseAnt

          public boolean isUseAnt()

      Tells whether to use Ant for compilation. If `true`, the standard Ant scalac (or fsc) task will be used for Scala and Java joint compilation. If `false`, the Zinc incremental compiler will be used instead. The latter can be significantly faster, especially if there are few source code changes between compiler runs. Defaults to `true`.

    - #### setUseAnt

          public void setUseAnt(boolean useAnt)

    - #### getIncrementalOptions

          public IncrementalCompileOptions getIncrementalOptions()

    - #### setIncrementalOptions

          public void setIncrementalOptions(IncrementalCompileOptions incrementalOptions)

    - #### excludeFromAntProperties

          protected boolean excludeFromAntProperties(String fieldName)

      Overrides:
        `excludeFromAntProperties` in class `AbstractOptions`

    - #### getAntPropertyName

          protected String getAntPropertyName(String fieldName)

      Overrides:
        `getAntPropertyName` in class `AbstractOptions`

    - #### getAntPropertyValue

          protected Object getAntPropertyValue(String fieldName,
                                   Object value)

      Overrides:
        `getAntPropertyValue` in class `AbstractOptions`