In this download area, you will be able to download the distribution (binary and source), the Windows installer and the documentation for Groovy.
For a quick and effortless start on Mac OSX, Linux or Cygwin, you can use GVM (the Groovy enVironment Manager) to download and configure any Groovy version of your choice. Basic instructions can be found below.
If you plan on using invokedynamic support, read those notes.
For those who want to test the very latest versions of Groovy and live on the bleeding edge, you can use our snapshot builds. As soon as a build succeeds on our continuous integration server a snapshot is deployed to Artifactory’s OSS snapshot repository.
Groovy 2.4 requires Java 6+ with full support up to Java 8.
There are currently some known issues for some aspects when using Java 9 snapshots.
groovy-nio module requires Java 7+.
Using Groovy’s invokeDynamic features require Java 7+ but we recommend Java 8.
The Groovy CI server is also useful to look at to confirm supported Java versions for different Groovy releases. The test suite (getting close to 10000 tests) runs for the currently supported streams of Groovy across all the main versions of Java each stream supports.
If you wish to embed Groovy in your application, you may just prefer to point to your favourite maven repositories or the JCenter maven repository.
<groupId>org.codehaus.groovy</groupId> <artifactId>groovy</artifactId> <version>2.4.5</version>
Just the core of groovy without the modules (see below).
<groupId>org.codehaus.groovy</groupId> <artifactId>groovy-$module</artifactId> <version>2.4.5</version>
"$module" stands for the different optional groovy modules "ant", "bsf", "console", "docgenerator", "groovydoc", "groovysh", "jmx", "json", "jsr223", "servlet", "sql", "swing", "test", "testng" and "xml". Example: <artifactId>groovy-sql</artifactId>
<groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> <version>2.4.5</version>
The core plus all the modules. Optional dependencies are marked as optional. You may need to include some of the optional dependencies to use some features of Groovy, e.g. AntBuilder, GroovyMBeans, etc.
To use the InvokeDynamic version of the jars just append ':indy' for Gradle or <classifier>indy</classifier> for Maven.
This tool makes installing Groovy on any Bash platform (Mac OSX, Linux, Cygwin, Solaris or FreeBSD) very easy.
Simply open a new terminal and enter:
$ curl -s get.gvmtool.net | bash
Follow the instructions on-screen to complete installation.
Open a new terminal or type the command:
$ source "$HOME/.gvm/bin/gvm-init.sh"
Then install the latest stable Groovy:
$ gvm install groovy
After installation is complete and you’ve made it your default version, test it with:
$ groovy -version
That’s all there is to it!
If you’re on MacOS and have MacPorts installed, you can run:
sudo port install groovy
If you’re on MacOS and have Homebrew installed, you can run:
brew install groovy
If you’re on Windows, you can also use the NSIS Windows installer.
You may download other distributions of Groovy from this site.
If you prefer to live on the bleeding edge, you can also grab the source code from GitHub.
If you are an IDE user, you can just grab the latest IDE plugin and follow the plugin installation instructions.
These instructions describe how to install a binary distribution of Groovy.
First, Download a binary distribution of Groovy and unpack it into some file on your local file system.
GROOVY_HOMEenvironment variable to the directory you unpacked the distribution.
JAVA_HOMEenvironment variable to point to your JDK. On OS X this is
/Library/Java/Home, on other unixes its often
/usr/javaetc. If you’ve already installed tools like Ant or Maven you’ve probably already done this step.
You should now have Groovy installed properly. You can test this by typing the following in a command shell:
Which should create an interactive groovy shell where you can type Groovy statements. Or to run the Swing interactive console type:
To run a specific Groovy script type: