Add MANIFEST entries in published Jars

Closes gh-391
This commit is contained in:
Brian Clozel
2022-05-18 12:04:46 +02:00
parent 26c5cf0265
commit e268157909

View File

@@ -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")