I am trying with Gradle first time. I am trying with a maven java project to compile and create a jar file. It is compiling and creating the jar file in build/libs directory as
Currently using Kotlin as Gradle DSL. Following statement works for me:
tasks.withType {
setProperty("archiveFileName", "hello-world.jar")
}
It works on Spring Boot executable jars as well.
If you want to keep version numbers:
tasks.withType {
setProperty("archiveBaseName", "hello-world")
}
It will produce something like hello-world-1.2.3.jar