Groovy‘s RootLoader is a handy class that can be used to encapsulate a Groovy script’s reference to external classpath dependencies within the script itself. The documentation for RootLoader states, ...
For most Groovy scripts I use, I simply run the script from its Groovy source code as-is and allow the compilation to take place implicitly. However, it can be helpful at times to use groovyc to ...