Current Behavior
With this config:
val cleanup = tasks.register("cleanup") {
doLast {
throw GradleException("cleanup should fail too!")
}
dependsOn("failing")
}
val failing = tasks.register("failing") {
doFirst {
throw GradleException("OH no! I Failed! I need cleanup!")
}
finalizedBy(cleanup)
}
executing failing does not trigger cleanup afterwards.
When the dependsOn is removed it works correctly
Expected Behavior
cleanup is able to depend on failing without breaking the finalizedBy constraint
Context (optional)
No response
Steps to Reproduce
https://github.com/nbrugger-tgm/gradle-issue-reproducer
./gradlew failing
Gradle version
8.4, 8.5
Build scan URL (optional)
No response
Your Environment (optional)
No response
Current Behavior
With this config:
executing
failingdoes not trigger cleanup afterwards.When the
dependsOnis removed it works correctlyExpected Behavior
cleanupis able to depend onfailingwithout breaking thefinalizedByconstraintContext (optional)
No response
Steps to Reproduce
https://github.com/nbrugger-tgm/gradle-issue-reproducer
./gradlew failingGradle version
8.4, 8.5
Build scan URL (optional)
No response
Your Environment (optional)
No response