W
W
Who_Is_Who2018-10-26 15:31:03
Java
Who_Is_Who, 2018-10-26 15:31:03

In what cases is "delete rootProject.buildDir" used in gradle?

In gradle:

task clean(type: Delete) {
    delete rootProject.buildDir
}

What is it used for?
An indirect answer on another forum says:
The command gradlew cleandoes not only execute the clean task of your root project, but the cleantask of any project in the build.
Both the Android plugin and the Java plugin already provide a cleantask that deletes the build directory.
For the root project no such plugin is applied, that is why a task is added manually.

But it does little to reveal the essence of the matter. And is it required or desirable in gradle?

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question