Friday, December 11, 2015

GRADLE - delete whole directory with all subdirectories

Override clean task:

clean {
    delete += 'dist'
}

If you do like this it will remove all files but leaves empty sub-directories:(!!!!!!)
clean {
    delete += fileTree('someDir')
}
or
clean {
    delete += fileTree('someDir').include('**/*')
}

No comments: