Creating Groovy Scripts
To create a Groovy script, do one of the following
- Choose New | Groovy script on the context menu of the destination
package. In this case, IntelliJ IDEA creates a file with
the specified name and
groovyextension, and adds a node to the module tree view.
- A Groovy class that contains anything but declarations, is perceived as a script. Thus, if you open a Groovy class in the editor, and type the desired source code, the corresponding file is automatically converted into a Groovy script, and is marked with the script icon:
Last modified: 4 December 2014