From fa8b5375c2e6768cda1da0b55076e874e6f150c1 Mon Sep 17 00:00:00 2001 From: Mark Vieira Date: Mon, 15 Jul 2024 10:34:51 -0700 Subject: [PATCH] Add runtime classpath as input to ThirdPartyAuditTask (#110882) The runtime classpath of `ThirdPartyAuditTask` was not being tracked as an input which can cause issues with task output caching and build avoidance. --- .../gradle/internal/precommit/ThirdPartyAuditTask.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ThirdPartyAuditTask.java b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ThirdPartyAuditTask.java index 4263ef2b1f76f..489cff65976b1 100644 --- a/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ThirdPartyAuditTask.java +++ b/build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/precommit/ThirdPartyAuditTask.java @@ -193,6 +193,11 @@ public Set getMissingClassExcludes() { @SkipWhenEmpty public abstract ConfigurableFileCollection getJarsToScan(); + @Classpath + public FileCollection getClasspath() { + return classpath; + } + @TaskAction public void runThirdPartyAudit() throws IOException { Set jars = getJarsToScan().getFiles();