Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Declare repoDir as output of reset task
As of Gradle 4.2, when execution of a task begins, any "stale" outputs will be deleted. All files under build and any declared outputs are considered managed by Gradle. If other files happen to be in there, Gradle will delete them. The reset task did not declare any outputs, but created the build/gitPublish directory and cloned the repo in there. When the copy task rolls around, it sees some that cloned repo as stale files in its output directory, since the copy task didn't put them there. Since they are also under build, Gradle considers itself the owner and thinks it's safe to delete them. By declaring the repodir as an output, the intent is to prevent Gradle from considering those stale outputs. We still need to be careful not to make Gradle do up-to-date logic on the reset task, since that isn't really possible to declare with normal Gradle input options. This is intended to address #35. [1] https://docs.gradle.org/4.2/release-notes.html#safer-handling-of-stale-output-files
- Loading branch information