I had the same problem with lazy evaluation of classpath for manifest attributes. I found this solution and after further search, it think it should be possible to use lazy string evaluation like this (lazy expressions):
manifest {
attributes {
"${ -> configuration.collect { it.toURI() } .join(' ') }"
}
}