Skip to content

Commit

Permalink
Add @IgnoreEmptyDirectories where adequate
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfs committed Aug 26, 2022
1 parent 0471f30 commit 0b27c60
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import org.gradle.api.file.FileTreeElement
import org.gradle.api.provider.Provider
import org.gradle.api.specs.Spec
import org.gradle.api.tasks.Console
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 @@ -331,6 +332,7 @@ abstract class AbstractAsciidoctorBaseTask extends DefaultTask {
*/
@InputFiles
@SkipWhenEmpty
@IgnoreEmptyDirectories
@PathSensitive(RELATIVE)
FileTree getSourceFileTree() {
if (languages.empty) {
Expand All @@ -352,6 +354,7 @@ abstract class AbstractAsciidoctorBaseTask extends DefaultTask {
*
*/
@InputFiles
@IgnoreEmptyDirectories
@PathSensitive(RELATIVE)
FileTree getSecondarySourceFileTree() {
if (languages.empty) {
Expand Down Expand Up @@ -631,6 +634,7 @@ abstract class AbstractAsciidoctorBaseTask extends DefaultTask {
super()
inputs.files { filesFromCopySpec(getResourceCopySpec(Optional.empty())) }
.withPathSensitivity(RELATIVE)
.ignoreEmptyDirectories()
this.srcDir = createDirectoryProperty(project)
this.outDir = createDirectoryProperty(project)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class AsciidoctorPdfTask extends AbstractAsciidoctorTask {
* @return Directories for the pdf fonts
* */
@InputFiles
@IgnoreEmptyDirectories
@PathSensitive(PathSensitivity.RELATIVE)
@Optional
FileCollection getFontsDirs() {
Expand Down

0 comments on commit 0b27c60

Please sign in to comment.