This message was deleted.
# community-support
s
This message was deleted.
c
In the end I went with:
Copy code
sync.from(extension.getFileProperty());
followed by:
Copy code
pushTask.getFileInput().fileProvider(syncTask.map(s -> {
           ConfigurableFileTree files = project.fileTree(s.getDestinationDir());
           if (files.isEmpty()) {
             return null;
           } else {
             return files.getSingleFile();
           }
         }));
Then push task then has the following in it’s constructor:
Copy code
onlyIf(t -> getFileInput().map(f -> f.getAsFile().exists()).getOrElse(false));