private static boolean containsAllSourceSetOutput(@NotNull AbstractArchiveTask archiveTask, @NotNull SourceSet sourceSet) {
    Set<File> outputFiles = new HashSet<>(sourceSet.getOutput().getFiles());
    Project project = archiveTask.getProject();

    try {
      Set<Object> sourcePaths = getArchiveTaskSourcePaths(archiveTask);
      for (Object path : sourcePaths) {
        if (isSafeToResolve(path, project) || isResolvableFileCollection(path, project)) {
          outputFiles.removeAll(project.files(path).getFiles());
        }
      }
    }
    catch (Exception e) {
      throw new RuntimeException(e);
    }
    return outputFiles.isEmpty();
  }
private static boolean containsAllSourceSetOutput(@NotNull AbstractArchiveTask archiveTask, @NotNull SourceSet sourceSet)