Rename war file

I’m trying to change the name of the war file from the default (the project directory name) but I can’t seem to find a way to do it.

Google led me to trying the ‘customName’ property but that failed with a message that dynamic properties properties are deprecated.

There is no ‘customName’ property. You can set ‘war.baseName’ or ‘war.archiveName’. For details check War in the Gradle Build Language Reference.