concept groovyc in category groovy

This is an excerpt from Manning's book Groovy in Action, Second Edition.
One step up on the integration ladder and you meet the issue of references. A Groovy class may reference a Java class (that goes without saying) and a Java class may reference a Groovy class, as you’ve just seen. You can even have circular references and groovyc compiles them all transparently. Even better, the leading IDEs provide cross-language compile, navigation, and refactoring such that you rarely need to care about the project build setup. You’re free to choose Java or Groovy when implementing any class for that matter. Such tight build-time integration is a challenge for every other language.
Compiling Groovy is straightforward because it comes with a compiler called groovyc. The groovyc compiler generates at least one class file for each Groovy source file compiled. As an example, you can compile Gold.groovy from the previous section into normal Java bytecode by running groovyc on the script file like so:
groovyc -d classes Gold.groovyIn this case, the groovyc compiler outputs Java class files to a directory named classes, which you told it to do with the -d flag. If the directory specified with -d doesn’t exist, it’s created. When you’re running the compiler, the name of each generated class file is printed to the console.