dweiss commented on code in PR #834:
URL: https://github.com/apache/lucene/pull/834#discussion_r857583962
##########
gradle/validation/spotless.gradle:
##########
@@ -110,10 +110,8 @@ configure(project(":lucene").subprojects) { prj ->
check.dependsOn v
v.dependsOn ":checkJdkInternalsExportedToGradle"
}
-}
-gradle.taskGraph.afterTask { Task task, TaskState state ->
- if (task.name == 'spotlessJavaCheck' && state.failure) {
- throw new GradleException("\n****************************\n*PLEASE RUN
./gradlew tidy!*\n****************************");
+ tasks.matching { task -> task.name == "spotlessJavaCheck" }.configureEach {
Review Comment:
Those tasks.matching and withType are often required - they're dynamic
collections and invoke the configuration block for objects that satisfy the
criteria but are created later (or elsewhere) during configuration. It's a way
to break dependency cycles between script evaluation, plugins, task creation,
etc. I don't think there is a nicer way to do many of the things these blocks
are currently used for.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]