[GRADLE-3435] Task is UP-TO-DATE after moving files between @InputFiles properties Created: 13/Apr/16 Updated: 25/Jan/17 Resolved: 07/Jun/16
|Fix Version/s:||3.0-milestone-2, 3.0-rc-2|
|Reporter:||Lóránt Pintér||Assignee:||Lóránt Pintér|
Consider the following build script:
Execute it, and then change the task creation part to this:
Obviously the purpose of input2.txt is now different, yet the task is detected as UP-TO-DATE during the next build.
The background of the problem is that Gradle considers all input files of a task as a single collection, erasing boundaries between different properties.
|Comment by Lóránt Pintér [ 13/Apr/16 ]|
Similarly, when a directory is move between two @OutputDirectories properties, the task is considered up-to-date.
|Comment by Lóránt Pintér [ 13/May/16 ]|
Added some tests for this bug: https://github.com/gradle/gradle/blob/bf4d314fe053eb48600cda0f1152aa63e9da8bac/subprojects/core/src/integTest/groovy/org/gradle/api/tasks/TaskInputPropertiesIntegrationTest.groovy#L63-L155