Add Created-By attribute to jar manifests

This commit ensures that the 'Created-By:' attribute [1] is added to
each jar's META-INF/MANIFEST.MF in order to identify clearly the vendor
and version of Java used during the build process.

[1]: http://docs.oracle.com/javase/7/docs/technotes/guides/jar/jar.html
This commit is contained in:
Chris Beams 2012-09-11 22:20:20 +02:00
parent 0af04910f9
commit 6c8f795122
1 changed files with 2 additions and 0 deletions

View File

@ -58,6 +58,8 @@ configure(subprojects) { subproject ->
apply from: "${rootProject.projectDir}/publish-maven.gradle"
jar {
manifest.attributes['Created-By'] =
"${System.getProperty('java.version')} (${System.getProperty('java.specification.vendor')})"
manifest.attributes['Implementation-Title'] = subproject.name
manifest.attributes['Implementation-Version'] = subproject.version