Given the following in a task:
def testList = 'a'..'z'
componentList = testList + testList + testList + testList + testList + testList
outputs.files files(componentList.collect { "../../src/${it}/${winPlatform}" })
println componentList.collect { "../../src/${it}/${winPlatform}" }
println componentList.size()
The task executes as expected, because the ‘a’…‘z’ directories do not exist:
...
../../src/x/win_x64, ../../src/y/win_x64, ../../src/z/win_x64]
156
:oldBuildscripts:makeTree
Executing on the following components - [a, b, c, ...
The reason why I tried so many of the above was due to the fact that my project has over a 130 real source component directories that are created by this task. However, when I specify the legitimate list of component directories, the task is always seen as up-to-date.
[../../src/component1/win_x64, ../../src/component2/win_x64, ..., ../../src/component135/win_x64]
135
:oldBuildscripts:makeTree UP-TO-DATE
Even more puzzling is using a shorter list of components, such as the first 5, will execute the task:
outputs.files files(componentList[1..5].collect { "../../src/${it}/${winPlatform}" })
println componentList[1..5].collect { "../../src/${it}/${winPlatform}" }
println componentList.size()
Output from the above:
[../../src/component1/win_x64, ../../src/component2/win_x64, ../../src/component3/win_x64, ../../src/component4/win_x64, ../../s
rc/component5/win_x64]
135
:oldBuildscripts:makeTree
Executing on the following components - [...
Any ideas why this might be happening? This is the gradle wrapper with 1.9, executing on Windows 7 x64.