An example project showing how to use Gradle to build a Groovy Script into an executable JAR file.
It uses the shadow plugin to generate the jar file...
You need to have a jdk installed on your machine. (I'm using OpenJdk Zulu 17)
To run the project via Gradle, use the following command:
./gradlew run
To build an executable JAR file, use the following command:
./gradlew shadowJar
To run the executable JAR file, use the following command:
java -jar app/build/libs/app-all.jar
To run the tests, use the following command:
./gradlew test