Skip to content

Commit ca708f8

Browse files
authored
[Gradle] Fix configuration cache for validateChangelogs task definition (elastic#116716) (elastic#119276)
(cherry picked from commit 31492f5)
1 parent 579a57d commit ca708f8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

build.gradle

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,11 @@ gradle.projectsEvaluated {
411411
}
412412
}
413413

414-
tasks.named("validateChangelogs") {
415-
onlyIf { project.gradle.startParameter.taskNames.any { it.startsWith("checkPart") || it == 'functionalTests' } == false }
414+
tasks.named("validateChangelogs").configure {
415+
def triggeredTaskNames = gradle.startParameter.taskNames
416+
onlyIf {
417+
triggeredTaskNames.any { it.startsWith("checkPart") || it == 'functionalTests' } == false
418+
}
416419
}
417420

418421
tasks.named("precommit") {

0 commit comments

Comments
 (0)