On 06.01.2011, at 21:18, Adam Murdoch wrote: > > On 03/01/2011, at 10:35 PM, Joern Huxhorn wrote: > >> Hi list, especially Adam. >> >> We just had a quick chat on IRC about processResources not being executed >> even though values used in expand have changed. >> You have pointed me to http://jira.codehaus.org/browse/GRADLE-1276 and >> mentioned that adding >> processResources { outputs.upToDateWhen { false } } >> would fix the issue. >> >> Well... kind of... >> processResources was indeed executed as expected but jar and all the other >> archive related tasks weren't. >> I don't know why those don't realize that the input did, in fact, change. > > Those other tasks will only execute if their direct inputs have changed. So, > if processResources is generating the same output each time, even though the > properties have changed, then the other tasks will not execute. > > Perhaps you could start by checking the processResources is actually > generating different content in its output files when the properties change > (that the content changes, not just that the timestamp changes). >
Hi Adam, I just submitted a bug report for this issue: http://jira.codehaus.org/browse/GRADLE-1298 It includes a small example to reproduce the problem. Even if processResources did not change the output this would still be a serious issue since it is expected to change it.: processResources { outputs.upToDateWhen { false } // Workaround for http://jira.codehaus.org/browse/GRADLE-1276 from(sourceSets.main.resources.srcDirs) { exclude '**/*.properties' } from(sourceSets.main.resources.srcDirs) { include '**/*.properties' expand( 'timestamp': System.currentTimeMillis() ) } } The resource in question should change on every build since the timestamp of the build is supposed to end up in a filtered properties file. This works correctly upon first build and if built using "gradle clean build" but not just by executing "gradle build"... Cheers, Joern. --------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
