Importing

Imports are a useful way to declutter your scripts by hiding common blocks of code constructs such as multiple Groovy import statements

Groovy Documentation Comments

These have the same structure as Javadoc comments: a documentation comment consists of the characters between /** and */ that end it. Leading asterisks are allowed on each line.

The below is an example of a script importing one script containing all common Groovy import statements:

/**
 * Sample Groovy script using import to template all common import statements
 * 
 * @import ProjectImports
 * 
 */

Warning

It is not possible to import a script module that does not have the same application key as the including script unless you prefix the include module name with the appKey. For example: myapp.MyScript

When the main script is compiled, main script text from the imported script(s) is copied into to the current main script.

This templating mechanism injects code into your main script in the order of @import declaration. Multiple imports are supported.