The easiest way is to compile your groovy files with groovyc and then pack them into a jar file with jar . For instance:
groovyc -d classes myclasses.groovy jar cvf myclasses.jar -C classes .
I will also consider gradle. To get started, you can use build.gradle containing only:
apply plugin: 'groovy'
Then put the source files in a subdirectory called src/main/groovy and run the gradle jar . It will create your source files in a jar file in build/libs .
source share