简体   繁体   中英

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?

这对我有用:

delete "$rootProject.projectDir/build/"

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM