I am adding a library to jCenter so to do that I needed to add some plugins to my project\'s build.gradle file. However, I am getting the error
Declar
You should not try to override the default clean
task, but instead configure it to delete additional stuff like
clean {
delete rootProject.buildDir
}
But check first whether this is not the default behavior of the clean task anyway.
Alternatively if you want to be able to do a specific clean action individually, you can also define a separate task and add a dependency like
task customClean(type: Delete) {
delete rootProject.buildDir
}
clean.dependsOn customClean