I want to package the Groovy CLI application in a form that is easy to distribute, similar to what Java does with the JAR. I could not find anything that could do this. I found a couple of things like this that are for one-time scripts, but nothing that could compile a whole Groovy application, a lot of different Groovy files and resource data.
I donβt need the Groovy standalone executable to be part of it (although that would be nice), and it is not a library intended for use by other JVM languages. All I want is just a packaged version of my application.
EDIT : Based on a few answers that I received, I do not think that I was sufficiently clear in my purpose. I am mainly looking for an archive format that Groovy can support. The goal here is to make it easier to distribute. Right now, the best way is to create a ZIP file, you can unzip it, and then modify the package / shell file to run it. I was hoping to find a way to make it more like an executable JAR file, where the user just needs to run one file.
I know that Groovy will compile with JVM-compatible bytecode, but I'm not trying to get it to work like Java code. I am dynamically adding Groovy classes at runtime based on user configuration and Java will not be able to handle this. As I said in the original post, the presence of the Groovy executable included in the archive is pretty nice. However, I really need Groovy for the executable, not Java.
source share