Looking to create a spring boot fat jar, but unsure how to convert the bootRepackage
task found here in my build.kts
file:
bootRepackage {
mainClass = 'demo.Application'
}
New day, new discovery. Spring Boot docs show that the bootRepackage
task has been replaced by bootJar
in 2017 and the bootJar
task comes out of the box with the spring boot gradle plugin.
The bootRepackage task has been replaced with bootJar and bootWar tasks for building executable jars and wars respectively
build.gradle.kts
// option 1
tasks {
getByName<BootJar>("bootJar") {
classifier = "boot"
mainClassName = "com.example.Application"
}
}
// option 2
tasks.getByName<BootJar>("bootJar") {
classifier = "boot"
mainClassName = "com.example.Application"
}