The zip task reports that it is up-to-date, even though I have updated the into closure parameter


(Kevin Maskell-Moody) #1

I’m using gradle 1.6. When I update the “into” directory parameter in the following (where bcpCopy is a task that myBuild depends on):

From:

// Finally, zip the deliverables into an archive
task myArchive (type: Zip) {
    description "Zip the build into a single artifact."
    dependsOn myBuild
          into("lib") {
        from("$projectDir/lib")
    }
    into("include") {
        from("$bcpCopy.outputDir/$bcpCopy.namespace")
    }
}

To:

// Finally, zip the deliverables into an archive
task myArchive (type: Zip) {
    description "Zip the build into a single artifact."
    dependsOn myBuild
          into("lib") {
        from("$projectDir/lib")
    }
    into("include/$bcpCopy.namespace") {
        from("$bcpCopy.outputDir/$bcpCopy.namespace")
    }
}

The build reports that the task is up-to-date. But, I’ve clearly changed the structure of the zip, right?

Regards, Kevin


(Kevin Maskell-Moody) #2

An additional question is, do I have to explicitly set the from directories as inputs to the myArchive task? I would’ve thought that this was already defined in the Zip task type. Yet, my build continually reports that the myArchive task is up-to-date.