I have a Swing GUI application. I'd like to have a traditional "About" dialog box that displays some copyright information and the application version to the user.
Our build system (based on Gradle) already keeps track of versions, and there is a property file in the source tree containing the major+minor+patch version number.
It would be fairly easy to have Gradle generate a text file (or use the existing properties file), which is installed with the app. The app could read from the file when displaying the About box. I'd like to avoid that, as I don't like the idea of users being able to modify that file.
Maybe the build could hard-code the version somehow into the built Jar?
Or maybe my app could read the data from the Jar files' Manifest somehow? Updating the MANIFEST.MF is easy in Gradle.
I think lots of other must have solved this well before, but I couldn't find anything on Google or here on StackOverflow which solves this for my particular situation. Ideally, I'm looking for consensus on a best practice