From 92bc05a647c41cccbf01f95034d56a30259d5d59 Mon Sep 17 00:00:00 2001 From: Stefan Wolf Date: Thu, 28 Oct 2021 18:18:23 +0200 Subject: [PATCH] Ignore empty directories for sources Empty directories should not matter for source files, so let's ignore them for up-to-date checks as well. --- .../com/google/protobuf/gradle/GenerateProtoTask.groovy | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy b/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy index cf4f606a..0cf3a714 100644 --- a/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy +++ b/src/main/groovy/com/google/protobuf/gradle/GenerateProtoTask.groovy @@ -50,6 +50,7 @@ import org.gradle.api.provider.Property import org.gradle.api.provider.Provider import org.gradle.api.provider.ProviderFactory import org.gradle.api.tasks.CacheableTask +import org.gradle.api.tasks.IgnoreEmptyDirectories import org.gradle.api.tasks.Input import org.gradle.api.tasks.InputFiles import org.gradle.api.tasks.Internal @@ -302,8 +303,9 @@ public abstract class GenerateProtoTask extends DefaultTask { } @SkipWhenEmpty - @InputFiles @PathSensitive(PathSensitivity.RELATIVE) + @IgnoreEmptyDirectories + @InputFiles FileCollection getSourceFiles() { return sourceFiles }