I am an experienced Java developer and Maven user, and I am evaluating Gradle
for a possible transition. So far I have my multi-module project building
nicely and quite cleanly, and I have figured out how to get my configuration
files to be filtered via the ReplaceTokens filter as follows:
task filter(type: Copy) {
from 'src/main/resources'
into 'build/classes/main'
filter ReplaceTokens, tokens: [
timestamp: new Date().dateTimeString,
url: "http://localhost:8080/myapp ",
.
.
.
]
}
Things work just fine when I call filter directly, but calling build doesn't
call filter. As a result, the project is built with the files unfiltered. Can
you provide some insight on the configuration I need to add to make sure my
filter task is called as part of the build task?
Thanks.