@Override
  public Object buildAll(String modelName, Project project) {
    if (GradleVersionUtil.isCurrentGradleAtLeast("7.0") && project instanceof ProjectInternal) {
      try {
        DependenciesAccessors accessors = ((ProjectInternal)project).getServices().get(DependenciesAccessors.class);
        List<String> sources = accessors.getSources().getAsFiles().stream().map(Objects::toString).collect(Collectors.toList());
        List<String> classes = accessors.getClasses().getAsFiles().stream().map(Objects::toString).collect(Collectors.toList());
        return new DefaultDependencyAccessorsModel(sources, classes);
      }
      catch (UnknownServiceException | ServiceLookupException ignored) {
      }
    }
    return null;
  }
@Override
  public Object buildAll(String modelName, Project project)