Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I tell IntelliJ about groovy installed with brew on OSX

I'm running:

  • IntelliJ Ultimate 2016.3
  • Homebrew 1.1.2
  • OS X 10.11.5 El Capitan

I ran brew install groovy which resulted in groovy being installed in /usr/local/Cellar/groovy/2.4.7/. Brew also added a symlink: /usr/local/bin/groovy -> ../Cellar/groovy/2.4.7/bin/groovy

When I open the groovy project in IntelliJ, it gives me an option to Configure a Groovy SDK. I haven't set this up yet, so I get a "Create" button, which launches finder. From what I can tell there's nothing that I can select to make IntelliJ happy. I've tried /user/local/bin/groovy, /user/local/Cellar/groovy, /user/local/Cellar/groovy/2.4.7, /user/local/Cellar/groovy/2.4.7/bin etc. No mater which I choose, IntelliJ doesn't accept the library and continues to tell me "Error: library is not specified".

Does anyone know how I'm supposed to go about telling IntelliJ where groovy is?

like image 271
David Avatar asked Dec 12 '16 21:12

David


People also ask

How do I find Groovy version on Mac?

🙈 Need to install Java before we install Groovy! To check what version of Java you need for your installation, go to the groovy github repo and search the tags for your version of groovy.

How do I check my Groovy version?

Step16: To check whether Groovy is installed correctly or not, click on Command prompt and type groovy ? v and press enter. It will display the installer version of groovy of your system.

Does IntelliJ come 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.


1 Answers

  1. Install groovysdk:

     brew remove groovy  brew install groovysdk
  2. Set GROOVY_HOME, otherwise Intellij reports as broken installation:

     export GROOVY_HOME=/usr/local/opt/groovy/libexec
  3. Point IntelliJ to the installed directory, e.g.:

     /usr/local/Cellar/groovysdk/2.4.7/libexec
like image 60
Omer van Kloeten Avatar answered Oct 01 '22 00:10

Omer van Kloeten