From d3252b0cc6d6918087bc51816b3133138b5bf44e Mon Sep 17 00:00:00 2001 From: Rene Groeschke Date: Wed, 25 Dec 2024 22:14:05 +0100 Subject: [PATCH] [Gradle] Fix configuration cache for validateChangelogs task definition (#116716) (#119277) (cherry picked from commit 31492f52a3ba4468ec533941db09943b2ec8e381) --- build.gradle | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index 7df339ced744b..d0833eaae2165 100644 --- a/build.gradle +++ b/build.gradle @@ -404,8 +404,11 @@ gradle.projectsEvaluated { } } -tasks.named("validateChangelogs") { - onlyIf { project.gradle.startParameter.taskNames.any { it.startsWith("checkPart") || it == 'functionalTests' } == false } +tasks.named("validateChangelogs").configure { + def triggeredTaskNames = gradle.startParameter.taskNames + onlyIf { + triggeredTaskNames.any { it.startsWith("checkPart") || it == 'functionalTests' } == false + } } tasks.named("precommit") {