Declaring custom ‘clean’ task when using the standard Gradle lifecycle plugins is not allowed

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

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)