Why does Gradle check the date when there is no history?

I have a task that copies some large files (250MB each). The task looks something like this (but with a lot of files)

task copyWars {
    outputs.files (
            "deploy/war1.war",
            "deploy/war2.war"
    )
    doLast {
        copy {
            from "deploy"
            into "deploy"
            include 'root.war'
            rename 'root.war', 'war1.war'
        }
        copy {
            from "deploy"
            into "deploy"
            include 'root.war'
            rename 'root.war', 'war2.war'
        }
    }
}

      

When I run, I get a message like this:

Executing task ':copyWars' (up-to-date check took 5 mins 2.918 secs) due to:
  No history is available.

      

Gradle seems to want to do one last check, even if no history is available. Since these are large files, it takes some time to check.

Why would he check if there is no history?

+3


source to share





All Articles