Setting IntelliJ IDEA to run Groovy Script
1. Download Groovy SDK From https://groovy.apache.org/download.html or a specific version at https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/
Ex. Version 3.0.8 visit at https://groovy.jfrog.io/artifactory/dist-release-local/groovy-zips/apache-groovy-binary-3.0.8.zip
2. Unzip your download file. You can store it in the directory you need.
3. Open IntelliJ IDEA Application.
4. Create a new Project. In this step, you can create New Project and follow the default configuration or you can create an Empty Project and use a manual configuration. In this document will choose the Empty Project name “Groovy-Script”.
5. Right click on the project name and choose “Open Modul Settings”
6. The Project Structure window will be open. Choose Module in the left panel. On the right panel, please make sure your setting is the same as the below picture.
- Module SDK is OpenJDK or up to your java version on your computer
- Groovy Library is point to the folder that you unzip from your download directory (From step 2.)
- The third module is the library in extras-jaxb in the lib folder of your download directory
That’s the configuration I have set in my IntelliJ IDEA to run groovy script (Individual file).