Groovy Operators

Control Statements

Groovy File Handling

Groovy Error & Exceptions

Groovy Multithreading

Groovy Synchronization

Groovy - Environment



There are a variety of ways to get the Groovy environment setup.

Binary download and installation − Go to the link www.groovy-lang.org/download.html to get the Windows Installer section. Click on this option to start the download of the Groovy installer.

Groovy Environment Setup

Once you launch the installer, follow the steps given below to complete the installation.

Step 1 − Click the Next button in the installer screen.

Groovy 5.0.0 Setup

Step 2 − Click the I Agree button.

License Agreement

Step 3 − Accept the default Typical components and click the Next button.

Choose Components

Step 4 − Click the Finish button to complete the installation.

Finish Button

Once the above steps are followed, you can then start the groovy shell which is part of the Groovy installation that helps in testing our different aspects of the Groovy language without the need of having a full-fledged integrated development environment for Groovy. This can be done by running the command groovysh from the command prompt.

Running Command Groovysh

If you want to include the groovy binaries as part of you maven or gradle build, you can add the following lines

Gradle

'org.codehaus.groovy:groovy-all:5.0.0-alpha-2'

Maven

<dependency>
   <groupId>org.apache.groovy</groupId>
   <artifactId>groovy-all</artifactId>
   <version>5.0.0-alpha-2</version>
   <type>pom</type>
</dependency>
Advertisements