Intermittent UP-TO-DATE output status while copying to current directory "."


(Vath) #1

Hi All,

I am running into an intermittent issue where the UP-TO-DATE output status is randomly displayed during my copying task to a current directory “.” . Hope you can help!!!

Here is my simple build.gradle
task copyTask1(type: Copy) {
from '/location/to/a.zip’
into ‘new-directory’
}
task copyTask2(type: Copy) {
from '/location/to/a.zip’
into ‘.’
}

When I run “gradle copyTask1” the UP-TO-DATE status is displayed correctly but NOT with “gradle copyTask2”. Here are outputs when I ran “gradle copyTask2” multiple times.
$ gradle copyTask2
:copyTask2
BUILD SUCCESSFUL
Total time: 1.075 secs

$ gradle copyTask2
:copyTask2 UP-TO-DATE
BUILD SUCCESSFUL
Total time: 0.846 secs

I’ve ran it multiple times and keep seeing the UP-TO-DATE status randomly displayed.

I am using MAC OSX El Capitan + Gradle 3.1
Another note: When I switched to Gradle 2.14, the UP-TO-DATE status is not even displayed.

Vath