Skip to content

Commit e268157

Browse files
committed
Add MANIFEST entries in published Jars
Closes gh-391
1 parent 26c5cf0 commit e268157

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

gradle/publishing.gradle

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,14 @@ plugins.withType(JavaPlugin) {
2020
logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message
2121
}
2222

23+
jar {
24+
manifest.attributes["Implementation-Title"] = project.name
25+
manifest.attributes["Implementation-Version"] = project.version
26+
manifest.attributes["Automatic-Module-Name"] = project.name.replace('-', '.') // for Jigsaw
27+
manifest.attributes["Created-By"] =
28+
"${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})"
29+
}
30+
2331
task sourcesJar(type: Jar, dependsOn: classes) {
2432
duplicatesStrategy = DuplicatesStrategy.EXCLUDE
2533
archiveClassifier.set("sources")

0 commit comments

Comments
 (0)