Skip to content

Commit

Permalink
Ignore empty directories for sources
Browse files Browse the repository at this point in the history
Empty directories should not matter for source files, so let's ignore
them for up-to-date checks as well.
  • Loading branch information
wolfs committed Nov 4, 2021
1 parent 8544a32 commit 5f3df49
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -302,8 +303,9 @@ public abstract class GenerateProtoTask extends DefaultTask {
}

@SkipWhenEmpty
@InputFiles
@PathSensitive(PathSensitivity.RELATIVE)
@IgnoreEmptyDirectories
@InputFiles
FileCollection getSourceFiles() {
return sourceFiles
}
Expand Down

0 comments on commit 5f3df49

Please sign in to comment.