This is an example application of my blog post:
You can package the application by running one of the following commands at command prompt:
gradle assemble (runs only the tasks required to create the jar file)
gradle build (runs the full build)
Both commands create a jar file called first-java-project.jar to the build/libs directory.
You can run the application by running the following command at command prompt:
java -jar first-java-project.jar