From e268157909cc55fb10d256b5b04a5577eea2c23e Mon Sep 17 00:00:00 2001 From: Brian Clozel Date: Wed, 18 May 2022 12:04:46 +0200 Subject: [PATCH] Add MANIFEST entries in published Jars Closes gh-391 --- gradle/publishing.gradle | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/gradle/publishing.gradle b/gradle/publishing.gradle index 9a46379b..295eec0e 100644 --- a/gradle/publishing.gradle +++ b/gradle/publishing.gradle @@ -20,6 +20,14 @@ plugins.withType(JavaPlugin) { logging.captureStandardOutput LogLevel.INFO // suppress "## warnings" message } + jar { + manifest.attributes["Implementation-Title"] = project.name + manifest.attributes["Implementation-Version"] = project.version + manifest.attributes["Automatic-Module-Name"] = project.name.replace('-', '.') // for Jigsaw + manifest.attributes["Created-By"] = + "${System.getProperty("java.version")} (${System.getProperty("java.specification.vendor")})" + } + task sourcesJar(type: Jar, dependsOn: classes) { duplicatesStrategy = DuplicatesStrategy.EXCLUDE archiveClassifier.set("sources")