I use this Gradle configuration to copy generated asciidoc files.
But I need to delete old outdated files also.
task copyDocument(type: Copy) {
dependsOn bootJar
from file("build/docs/asciidoc/")
into file("src/main/resources/static/")
}
How I can delete the content of directory src/main/resources/static/
before I paste the new generated files?
CodePudding user response:
task copyDocument(type: Copy) {
dependsOn bootJar
from file("build/docs/asciidoc/")
into file("src/main/resources/static/")
doFirst {
delete "build/folder"
}
}