Skip to content

Commit

Permalink
Avoid appending the version to jar artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
jzbrooks committed Jan 13, 2025
1 parent ea3b1cb commit 18f7d2d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ tasks {
"--lib",
javaHome,
"--output",
"build/libs/vat-$os-$arch-$version.jar",
"build/libs/vat-$os-$arch.jar",
"--pg-conf",
"optimize.pro",
"build/libs/debug/vat-$os-$arch-$version.jar",
Expand All @@ -189,15 +189,15 @@ tasks {

dependsOn("$os${arch.capitalized()}Optimize")

inputs.file("build/libs/vat-$os-$arch-$version.jar")
inputs.file("build/libs/vat-$os-$arch.jar")
outputs.file(binaryFileProp)

doLast {
val binaryFile = binaryFileProp.get().asFile
binaryFile.parentFile.mkdirs()
binaryFile.delete()
binaryFile.appendText("#!/bin/sh\n\nexec java \$JAVA_OPTS -jar \$0 \"\$@\"\n\n")
file("build/libs/vat-$os-$arch-$version.jar").inputStream()
file("build/libs/vat-$os-$arch.jar").inputStream()
.use { binaryFile.appendBytes(it.readBytes()) }
binaryFile.setExecutable(true, false)
}
Expand Down

0 comments on commit 18f7d2d

Please sign in to comment.