Skip to content

AvatarQing/groovy-executable-jar-with-gradle-example

Repository files navigation

groovy-executable-jar-with-gradle-example

Description

Example for creating a Groovy stand-alone self-executable jar with gradle.

The generated jar contains the compiled groovy script, and the groovy embeddable jar.

Having this self-executable jar, you can start the groovy script, like java -jar MyScriptAsJar.jar

How to do a test run

  • Run command gradlew uberjar to execute the task uberjar
  • Generated jar file is at build\libs\printer-1.0.jar
  • Run command java -jar build/libs/printer-1.0.jar -p HelloGroovy to execute the jar

Alternative

Resource

About

Example for creating a Groovy stand-alone self-executable jar with gradle

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages