This repo shows how to determine the vendor, application name, and version of a jar at runtime.
To read more about this, check out the post I wrote on my blog.
To build:
$ ./gradlew clean jar
To run the java version:
$ java -jar build/libs/self-version-demo-1.0.0-SNAPSHOT.jar
To run the kotlin version, add a command line argument:
$ java -jar build/libs/self-version-demo-1.0.0-SNAPSHOT.jar kotlin