https://kotlinlang.org logo
Title
g

gildor

05/23/2018, 7:29 AM
Something like this
tasks {
   "jar"(Jar::class) {
       manifest {
         attributes 'Implementation-Title': project.name
       }
    }
}
l

Lex Luthra

05/23/2018, 7:36 AM
Thanks for reply. I tried this but seem to have had no effect:
"jar"(Jar::class) {
        manifest {
            attributes(mutableMapOf(
                "Implementation-Title" to project.name
            ))
        }
    }
Could this have anything to do with it being a Spring Boot JAR?
This seems to have done the trick:
withType(Jar::class.java) {
        manifest {
            attributes(mutableMapOf(
                "Implementation-Title" to project.name
            ))
        }
    }
Thanks for pointing in right direction 👍
g

gildor

05/23/2018, 7:57 AM
Yeah, correct, but be careful with
withType(Jar::class.java)
you set this attribute for all tasks with type Jar, your original groovy snipped did this only for task with name “jar”, but you right, if Spring Boot have own Jar task this is the way to solve your problem, or set this to specific task