From ba26d866e6cb062c910bebefa626dabea9b6564c Mon Sep 17 00:00:00 2001 From: Christian Dietrich Date: Mon, 24 Jan 2022 14:07:27 +0100 Subject: [PATCH] fix SkipWhenEmpty. Fixes #196 Signed-off-by: Christian Dietrich --- .../src/main/java/org/xtext/gradle/tasks/XtextGenerate.xtend | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xtext-gradle-plugin/src/main/java/org/xtext/gradle/tasks/XtextGenerate.xtend b/xtext-gradle-plugin/src/main/java/org/xtext/gradle/tasks/XtextGenerate.xtend index 3e8fe65..6d806fa 100644 --- a/xtext-gradle-plugin/src/main/java/org/xtext/gradle/tasks/XtextGenerate.xtend +++ b/xtext-gradle-plugin/src/main/java/org/xtext/gradle/tasks/XtextGenerate.xtend @@ -11,6 +11,7 @@ import org.gradle.api.DefaultTask import org.gradle.api.JavaVersion import org.gradle.api.file.FileCollection import org.gradle.api.tasks.Classpath +import org.gradle.api.tasks.IgnoreEmptyDirectories import org.gradle.api.tasks.InputFiles import org.gradle.api.tasks.Internal import org.gradle.api.tasks.Nested @@ -63,7 +64,7 @@ class XtextGenerate extends DefaultTask { sources.files } - @InputFiles @SkipWhenEmpty + @InputFiles @SkipWhenEmpty @IgnoreEmptyDirectories def getMainSources() { val extensions = languages.filter[!generator.outlets.empty].map[fileExtensions].flatten.map["**/*." + it] sources.files.matching[include(extensions)]