Workaround to prevent last modified on copy

Is there a workaround to prevent the last modified attribute of the files on a Gradle copy operation? Can I set it in the eachFile Closure?

Can you elaborate here? Are you saying you don’t want Gradle to update the last-modified attribute when it copies files? You cannot specify this at the moment, you could however use the Ant copy and set preservelastmodified to true assuming this is the behavior you are looking for.