LUCENE-9880: correct task ordering for clean.

This commit is contained in:
Dawid Weiss 2021-03-30 10:08:44 +02:00
parent 00e57f8c8a
commit 974e4bc5e8
2 changed files with 5 additions and 7 deletions

View File

@ -183,6 +183,6 @@ apply from: file('gradle/documentation/markdown.gradle')
apply from: file('gradle/documentation/render-javadoc.gradle')
apply from: file('gradle/hacks/gradle-archives.gradle')
apply from: file('gradle/hacks/gradle.gradle')
apply from: file('gradle/hacks/wipe-temp.gradle')
apply from: file('gradle/hacks/hashmapAssertions.gradle')
apply from: file('gradle/hacks/turbocharge-jvm-opts.gradle')

View File

@ -19,13 +19,11 @@
// so that it doesn't pollute user's tmp. Wipe it during a clean though.
configure(rootProject) {
task cleanGradleTmp(type: Delete) {
delete fileTree(".gradle/tmp").matching {
gradle.buildFinished {
rootProject.delete fileTree(".gradle/tmp").matching {
include "gradle-worker-classpath*"
}
}
clean.dependsOn cleanGradleTmp
}
// Make sure we clean up after running tests.
@ -33,7 +31,7 @@ allprojects {
plugins.withType(JavaPlugin) {
def temps = []
task cleanTaskTmp() {
task wipeTaskTemp() {
doLast {
temps.each { temp ->
project.delete fileTree(temp).matching {
@ -44,7 +42,7 @@ allprojects {
}
tasks.withType(Test) {
finalizedBy rootProject.cleanGradleTmp, cleanTaskTmp
finalizedBy wipeTaskTemp
temps += temporaryDir
}
}