add plugin library manifest

This commit is contained in:
2024-10-31 12:12:44 +00:00
parent 9e6c033e03
commit ecb195d2bc
3 changed files with 26 additions and 0 deletions

View File

@@ -33,6 +33,12 @@ id `ltd.hlaeja.plugin.hlaeja-common-plugin.library`
Default setting and tasks for libraries.
### Plugin Library Manifest
id `ltd.hlaeja.plugin.hlaeja-common-plugin.library-manifest`
Extend manifest in library jar file.
## Releasing plugin
Run `release.sh` script from `master` branch.

View File

@@ -0,0 +1,19 @@
plugins {
id("ltd.hlaeja.plugin.hlaeja-core-plugin")
}
tasks {
withType<Jar>().configureEach {
manifest.attributes.apply {
put("Implementation-Title", project.name.split("-").joinToString(" "))
put("Implementation-Version", project.version)
put("Implementation-Vendor", info.vendorName)
put("Built-By", System.getProperty("user.name"))
put("Built-Git", "${git.currentBranch()} #${git.currentShortHash()}")
put("Built-Gradle", project.gradle.gradleVersion)
put("Built-JDK", System.getProperty("java.version"))
put("Built-OS", "${System.getProperty("os.name")} v${System.getProperty("os.version")}")
put("Built-Time", info.utcTimestamp)
}
}
}

View File

@@ -2,6 +2,7 @@ import org.springframework.boot.gradle.tasks.bundling.BootJar
plugins {
id("ltd.hlaeja.plugin.hlaeja-common-plugin.common")
id("ltd.hlaeja.plugin.hlaeja-common-plugin.library-manifest")
id("org.springframework.boot")
}