I am using Spring Boot 2 in my Gradle project to do a build to jar in Jenkins, and I would like to change the name of that jar file.
By default, Spring Boot 2 used the G
Since bootJar tasks extends Jar you can use archiveName to set name the directly:
Jar
archiveName
bootJar { archiveName = 'whatever' }
Have a look here.