[GRADLE-872] Copy not paying attention to upToDateWhen Created: 24/Mar/10  Updated: 04/Jan/13  Resolved: 31/Dec/10

Status: Resolved
Project: Gradle
Affects Version/s: 0.9
Fix Version/s: 0.9.1

Type: Bug
Reporter: Jesse Eichar Assignee: Adam Murdoch
Resolution: Fixed Votes: 1


 Description   

I am copying some files and applying a filter to them. I want the task to depend on the file that contains the ReplaceTokens so I added an upToDateWhen closure. But it is ignored. Here is my tasks in my build.gradle file:

task filtering(type:Copy) {
from file('src/main/filtered-webapp')
into "$buildDir/webapp"

inputs.dir('filters')

def properties = new Properties()
file('filters/global-resource.filter').withReader

{ properties.load(it) }

filter(org.apache.tools.ant.filters.ReplaceTokens, tokens: properties)

outputs.upToDateWhen

{ task -> false }

}

Note:

inputs.properties properties

will not fix the problem as it is affected by the same bug


Generated at Wed Jun 30 11:41:05 CDT 2021 using Jira 8.4.2#804003-sha1:d21414fc212e3af190e92c2d2ac41299b89402cf.