Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Delete a folder in project root from build.gradle in Module

I use following task to delete a folder in current module :

task clearJar(type: Delete) {
    delete 'build/generated/'
}

To delete from another module in the same project:

delete project(':test').file('build/')

What if I want to delete a folder in root project in build.gradle under a module?

like image 640
Ali Avatar asked Oct 23 '25 04:10

Ali


1 Answers

This worked for me:

delete "$rootProject.projectDir/build/"
like image 100
Ali Avatar answered Oct 24 '25 19:10

Ali



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!