I just came across this cool little trick to compile and run Groovy scripts from Sublime Text Editor.
- Open the editor and go to menu Tools->Build System. This will open a new file named ‘untitled.sublime-build‘.
- Add the path to your Groovy installation directory as show below.
"cmd": ["C:/apps/Groovy/groovy-2.1.9/bin/groovy.bat", "$file"]
- Now ‘save’ the file as ‘groovy.sublime-build‘.
- Open your groovy script and in the menu select ‘Tools->Build System->Groovy’
- To compile and execute, ‘Tools->Build’ or F7 or Ctrl+B.