War task should allow bundling classes into jar

You can configure your ‘war’ task to get this behavior.

war {

classpath = classpath - sourceSets.main.output

from (jar) {

into ‘WEB-INF/lib’

}

}