Gradle Delete Task: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
(Created page with "=External= * https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Delete.htmll =Internal= * Gradle Task =Overview= Deletes files or directories.")
 
 
(2 intermediate revisions by the same user not shown)
Line 1: Line 1:
=External=
=External=


* https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Delete.htmll
* https://docs.gradle.org/current/dsl/org.gradle.api.tasks.Delete.html


=Internal=
=Internal=
Line 10: Line 10:


Deletes files or directories.
Deletes files or directories.
<syntaxhighlight lang='groovy'>
task delete(type: Delete) {
  delete 'some-folder', 'some-file'
  followSymlinks = true
}
</syntaxhighlight>
Example of a "clean" task implementation:
<syntaxhighlight lang='groovy'>
task clean(type: Delete) {
  delete buildDir
}
</syntaxhighlight>

Latest revision as of 00:05, 22 May 2018

External

Internal

Overview

Deletes files or directories.

task delete(type: Delete) {
  delete 'some-folder', 'some-file'
  followSymlinks = true
}

Example of a "clean" task implementation:

task clean(type: Delete) {
  delete buildDir
}