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

Popular posts from this blog

windows - Single EXE to Install Python Standalone Executable for Easy Distribution -

c# - Access objects in UserControl from MainWindow in WPF -

javascript - How to name a jQuery function to make a browser's back button work? -