Yeah, strange. ‘war’ is not a configuration at all, but a task. ‘compile’ or ‘testCompile’ is a built in configuration. And you are free to define arbitrarily configurations. I often use them to define dependencies for special build conditions, i.e. to have a war additional libraries in WEB-INF/lib for some reason.
I use ‘artifacts’ and ‘assemble’ like this:
artifacts {
archives war
}
assemble.dependsOn war
I think you might say:
assemble.depends on war, jar. And inside jar{} and war{} you would use a configuration.