Skip to content

Commit

Permalink
Merge pull request #646 from wolfs/wolfs/gradle-8-file-tree
Browse files Browse the repository at this point in the history
Add `@IgnoreEmptyDirectories` where adequate
  • Loading branch information
ysb33r authored Dec 30, 2022
2 parents 78ef86e + fdf086e commit 6e39326
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 @@ -334,6 +335,7 @@ abstract class AbstractAsciidoctorBaseTask extends DefaultTask {
*/
@InputFiles
@SkipWhenEmpty
@IgnoreEmptyDirectories
@PathSensitive(RELATIVE)
FileTree getSourceFileTree() {
if (languages.empty) {
Expand All @@ -355,6 +357,7 @@ abstract class AbstractAsciidoctorBaseTask extends DefaultTask {
*
*/
@InputFiles
@IgnoreEmptyDirectories
@PathSensitive(RELATIVE)
FileTree getSecondarySourceFileTree() {
if (languages.empty) {
Expand Down Expand Up @@ -635,6 +638,7 @@ abstract class AbstractAsciidoctorBaseTask extends DefaultTask {
this.projectOperations = ProjectOperations.find(project)
inputs.files { filesFromCopySpec(getResourceCopySpec(Optional.empty())) }
.withPathSensitivity(RELATIVE)
.ignoreEmptyDirectories()
this.srcDir = createDirectoryProperty(project)
this.outDir = createDirectoryProperty(project)
this.defaultRevNumber = projectOperations.projectTools.versionProvider.orElse(Project.DEFAULT_VERSION)
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 6e39326

Please sign in to comment.