Copy task fails, erroneously claiming it is UP-TO-DATE with Gradle 1.8


(Scott Palmer) #1

In code that works with Gradle 1.7 and I think 1.8-rc-1 (maybe also rc-2) I have a copy task configured like so:

task setupBaseSDK(type: Copy, dependsOn: [configurations.baseZip]) {

into stagingDir

from { configurations.baseZip.findAll { it.name.endsWith(".zip") }.collect { zipTree(it) } }

from { configurations.repoClientZip.findAll { it.name.endsWith(".zip") }.collect { zipTree(it) } } { into ‘RepositoryClient’ }

}

With Gradle 1.8 it claims to be UP-TO-DATE even though the destination directory is missing all of the files from the zips.


(Peter Niederwieser) #2

Did you do a clean build after bumping the Gradle version? I’d be surprised if anything changed here. Also ‘dependsOn repoClientZip’ appears to be missing.


(Scott Palmer) #3

Yes I did do a clean build. But maybe I need to manually delete things like the .gradle folder?


(Peter Niederwieser) #4

Normally it shouldn’t be necessary to delete other stuff. Are you saying that a clean build now results in an “empty” copy? Maybe something’s wrong with the configurations or their contents then?


(Scott Palmer) #5

I’ve added the dependency and deleted my ~/.gradle folder , then I did a clean build… same problem. Works fine with 1.7.


(Scott Palmer) #6

Fixed it… needed to delete the .gradle folder from the parent project directory.


(Peter Niederwieser) #7

Ouch. I’ve raised GRADLE-2898 for this. Thanks for reporting.