Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuring Groovy SDK within IntelliJ IDEA

People also ask

Does IntelliJ support Groovy?

Groovy The Groovy plugin is bundled with IntelliJ IDEA and enabled by default. IntelliJ IDEA supports the latest stable version of Groovy and Groovy 4 syntax.


IntelliJ IDEA expects the standard Groovy SDK layout which is provided with the official distributions available at https://groovy.apache.org/download.html. Just download, unpack into any directory, specify this directory as the library home.

Homebrew package layout may be different, however it may have the standard layout in the libexec subdirectory in some cases. Try /usr/local/opt/groovy/libexec (use Cmd + Shift + G to navigate to it).


Another suggestion to add to this solution here described in MAC OS you can also add symbolic link in Library. This will make it easy to select it within IntelliJ:

sudo ln -s /usr/local/opt/groovy/libexec /Library/Groovy

This first answer it excellent, but not sufficient. The hidden folder in Mac blocked me one more day. On Mac system, you can press Cmd + Shift + G to invoke the input dialog and input "/usr/local/opt/groovy/libexec" directly to resolve the issue that you cannot find the lib folder.


CrazyCoder gave the correct hints. But some of us use brew as our standard.

brew install groovysdk

In intellij when you get the dialog, as stated by haltTim, Cmd + Shift + G

Navigate to /usr/local/opt/groovysdk/libexec or the cellar path /usr/local/Cellar/groovysdk/???/libexec


  1. From the main menu select File | Project Structure ⌘;.
  2. In the Project Structure dialog, under Platform Settings, select Global Libraries. Image depicting the Intellij environment

Select Global Libraries, if nothing is there, click on add(+) icon at the top.

Then a small dialog box will appear, Select "from Maven", then another dialog box as shown below appears, iamge showing dialog box

Type in Groovy, then several options will pop up, select an option which has groovy:groovy-all and version 2.4.1(change version according to your need) and click ok. then apply and ok,

After this go to the same dialog box, of Configure SDK and select from drop-down.