I am trying to create a war file with Gradle, but I have a problem that excludes one directory and includes another that has the same name but different parent directories.
Note that in the first code example below, none of the css/ directories is included in the final war file - I assume because Gradle believes that I want to exclude any named css/ directory, regardless of its absolute path.
Basically I want to exclude src/main/webapp/css and enable build/tmp/css , because the latter contains a mini code. How can I achieve this? I tried to point the absolute path in various ways, but had no success.
war { dependsOn minify from('build/tmp/') { include ('css/') } exclude('WEB-INF/classes/', 'css/') }
If I do not exclude css/ like this:
war { dependsOn minify from('build/tmp/') { include ('css/') } exclude('WEB-INF/classes/') }
the result is that both minified and non-reduced code are included.
david
source share