Slackbot
07/07/2022, 7:42 PMChris
07/07/2022, 9:18 PMsync.from(extension.getFileProperty());
followed by:
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:
onlyIf(t -> getFileInput().map(f -> f.getAsFile().exists()).getOrElse(false));