title: Get value from `build.gradle` to code
body: <p>We have a <code>build.gradle</code> where the <code>version</code> is defined in it. I need to implement a version endpoint ( like <code>/version</code>) to get the version of the project. This <code>version</code> property in <code>build.gradle</code>  has been there for a long time, I can't move it to the <code>project.properties</code> file. How can I access this <code>version</code>'s values from my Java code? </p>