getConfigurationScriptFile

A Groovy script file that configures the compiler, allowing extensive control over how the code is compiled.

The script is executed as Groovy code, with the following context:

This facilitates the following pattern:

withConfig(configuration) {
  // use compiler configuration DSL here
}

For example, to activate type checking for all Groovy classes…

import groovy.transform.TypeChecked

withConfig(configuration) {
    ast(TypeChecked)
}

Please see the Groovy compiler customization builder documentation for more information about the compiler configuration DSL.

This feature is only available if compiling with Groovy 2.1 or later.

Since

9.7.0

See also