Augment cleanTest tasks rather than replacing them

Previously I hadn't realized that Gradle's "java" plugin would generate
default "cleanTest" tasks for us.  By defining my own "cleanTest" tasks
we were replacing the generated ones, but what we really wanted to do
was augment them with additional files to delete.
This commit is contained in:
Ben Liblit 2018-08-11 12:36:22 -05:00
parent d92c732dec
commit d9f7abdad3
3 changed files with 10 additions and 10 deletions

View File

@ -33,9 +33,9 @@ test {
exclude '**/FieldBasedJQueryTest.class'
}
task cleanTest(type: Delete) {
task cleanTestExtras(type: Delete) {
delete 'actual.dump'
delete 'expected.dump'
}
clean.dependsOn cleanTest
cleanTest.dependsOn cleanTestExtras

View File

@ -45,8 +45,8 @@ test {
classpath += files project(':com.ibm.wala.core.testdata').sourceSets.test.java.outputDir
}
task cleanTest(type: Delete) {
task cleanTestExtras(type: Delete) {
delete 'report'
}
clean.dependsOn cleanTest
cleanTest.dependsOn cleanTestExtras

View File

@ -150,12 +150,12 @@ test {
maxHeapSize = '800M'
}
task cleanTest(type: Delete) {
task cleanTestExtras(type: Delete) {
delete(
'parser.java',
'report',
'sym.java',
)
'parser.java',
'report',
'sym.java',
)
}
clean.dependsOn cleanTest
cleanTest.dependsOn cleanTestExtras