Thanks, I took the approach of renaming the archive in a
doLast like so:
//The target zipfile name should be versioned but
//internal root directory not. By default the distZip
//task uses the same property (archiveName) for
//both. To workaround, suppress the version in
//the archiveName property (by setting version = null)
//then, once the task is complete, we rename the
//zip as a post-processing step to add the version
//note that archivePath is a derived property.
//its return value is sensitive to the version
//property (among others).
def versionedPath = archivePath
version = null
I’m not a huge fan of this approach since it relies on mutating external variables to infer the archive name, but it seems to be the simplest/most generic. It would be nicer to have a way of just configuring these values once.