Continuing the discussion from Automatic clean for a Copy task deletes content unrelated to it
If I run the clean (cleanRenameBuildFile) rule of this task:
apply plugin: “base”
task renameBuildFile(type:Copy) {
outputs.file file(‘buildFile.gradle’)
from buildFile
into projectDir
rename buildFile.name, ‘buildFile.gradle’
}
gradle deletes the entire directory. Is there any solution for that issue?