Skip to content

Commit

Permalink
build: Merge jar task configuration in build.gradle.kts (#755)
Browse files Browse the repository at this point in the history
* Merge `jar` task configuration in build.gradle.kts
* Remove unneeded attribute in jar metadata.

---------

Co-authored-by: Steve Todorov <[email protected]>
  • Loading branch information
guicamest and steve-todorov authored Sep 26, 2023
1 parent 7913fe2 commit 5b6f838
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ tasks {
attrs["Build-CI"] = System.getProperty("CI", "false")
attrs["Version"] = version.toString()
manifest.attributes(attrs)
exclude("**/*.RSA", "**/*.SF", "**/*.DSA", "**/amazon-*.properties")
}

named<Task>("build") {
Expand Down Expand Up @@ -204,19 +205,6 @@ tasks {
dependsOn(named("it-s3"))
}

named<Jar>("jar") {
val attrs = HashMap<String, String?>()
val sdf = SimpleDateFormat("yyyy-MM-dd HH:mm:ss zzz")
sdf.timeZone = TimeZone.getTimeZone("UTC")
attrs["Build-Date"] = sdf.format(Date())
attrs["Build-JDK"] = System.getProperty("java.version")
attrs["Build-Gradle"] = project.gradle.gradleVersion
attrs["Build-OS"] = System.getProperty("os.name")
attrs["Build-Automatic"] = System.getProperty("CI", "false")
manifest.attributes(attrs)
exclude("**/*.RSA", "**/*.SF", "**/*.DSA", "**/amazon-*.properties")
}

withType<Sign> {
onlyIf {
(project.hasProperty("withSignature") && project.findProperty("withSignature") == "true") ||
Expand Down

0 comments on commit 5b6f838

Please sign in to comment.