Hi,
given the following tasks:
task createProperty(type: Copy) {
from "configuration"
into "$buildDir/configuration"
filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: project.ext.getProperties())
and given the following gradle.properties content in my project directory:
myProperty=aValue
and given the following content for a file located in configuration directory:
config.myProperty=@myProperty@
When I run for the first time the tasks, the content of the file generated will rightfully replace the placeholder by “aValue”.
But if afterward, I edit gradle.properties to change the value or use the -P command line options like -PmyProperty=anotherValue, gradle will go over the task saying that it is up-to-date and will not rewrite the value in the target configuration file.
The only workaround I have is to specified --rerun-tasks on the command line.
I am probably doing something wrong, but I cannot find what …
By the way I’m using gradle 1.9.