From 4bd4f7063bb5b796422857c9790ad4673ede3411 Mon Sep 17 00:00:00 2001 From: Houston Putman Date: Wed, 17 Feb 2021 18:12:27 -0500 Subject: [PATCH] LUCENE-9780: Only validate JARs for tasks that are enabled (#2382) --- gradle/validation/jar-checks.gradle | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/gradle/validation/jar-checks.gradle b/gradle/validation/jar-checks.gradle index d21cae30c02..6e1f97aea57 100644 --- a/gradle/validation/jar-checks.gradle +++ b/gradle/validation/jar-checks.gradle @@ -333,9 +333,13 @@ configure([project(":solr"), project(":lucene"),]) { } doFirst { - def allReferenced = validationTasks.collectMany { task -> - task.project.jarInfos.collectMany { it.referencedFiles } - }.collect { it.toString() } + def allReferenced = validationTasks + // Only collect for enabled tasks: https://issues.apache.org/jira/browse/LUCENE-9780 + .findAll { it.enabled } + .collectMany { task -> + task.project.jarInfos.collectMany { it.referencedFiles } + } + .collect { it.toString() } def patterns = ext.exclude def allExisting = fileTree(licensesDir, {