Gradle 2.7 copy task not working

I have this copy task which works fine with gradle 2.5

task install(dependsOn: build, type: Copy) {
    from "${buildDir}/binaries/helloExecutable"
    into "${prefix}"

Gradle 2.7 marks this task always as up-to-date and does nothing

can you run your build with -i to check why gradle is marking the task
as up-to-date. also are you sure ${buildDir}/binaries/helloExecutable
exists at the time you run the install task?

Thanks for your reply, that got me on the right track!
It’s not a bug. Gradle 2.5 and 2.7 behave the same, the bug was in my respective clean task configuration:

This first version does the delete in the doLast() method which is simply too late for the copy task to detect any needs for action:

clean << {
    delete "${prefix}/hello"

Now this version does the delete in the configuration phase which is fine for the copy task to jump into action:

clean {
    delete "${prefix}/hello"