How does gradle copy task handle two source files where destination location overlaps?

Assuming you map two source directories to the same copy location, what happens when there are files with identical names in both source dirs. Which file will end up in the destination? Can you control this behavior?

I found the answer here, as long as it is still valid …

It has changed. New capabilities were added in 1.7:

And improved in 1.8: