From a92e8ebd999dd38f231844e07c980661bd69746b Mon Sep 17 00:00:00 2001 From: Clay Johnson Date: Tue, 3 May 2022 14:41:35 -0500 Subject: [PATCH] Consider `path` definitions as task inputs See #557. --- .../google/protobuf/gradle/GenerateProtoTask.groovy | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy b/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy index 678e5cf1..d382614c 100644 --- a/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy +++ b/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy @@ -379,6 +379,18 @@ public abstract class GenerateProtoTask extends DefaultTask { } } + @InputFiles + @PathSensitive(PathSensitivity.NONE) + FileCollection getExecutables() { + objectFactory.fileCollection().from { + protocLocator.getOrNull()?.path + }.from { + pluginsExecutableLocators.get().values() + .collect { it.path } + .findAll { it } + } + } + @Internal("Input captured by getAlternativePaths()") abstract MapProperty getPluginsExecutableLocators()