Gradle task take over configuration of war -
for web project need build 2 war files. 1 static content, 1 without.
war { archivename = "feeder##${version}.full.war" exclude 'test.html', 'test.js', 'todos.js' } task smallwar(type: war, dependson:[war]) { // exclude 'css', 'img', 'js', 'template', 'index.html' archivename = "feeder##${version}.war" } it's clear, i'm able configure both same way, how can take on configuration , enhance it?
current configuration calls war before running smallwar.
don't want call it. instead smallwar task should exclude same files war plus additional files.
the dependson affects execution, not configuration. easy way configure commonalities between 2 war tasks is:
tasks.withtype(war) { exclude 'test.html', 'test.js', 'todos.js' } smallwar can add further excludes:
task smallwar(type: war) { exclude 'css', 'img', 'js' }
Comments
Post a Comment