private static void setIdeaPluginDependencyDownloadPolicy(@NotNull Project project, @NotNull GradleDependencyDownloadPolicy policy) {
    project.getPlugins().withType(IdeaPlugin.class, plugin -> {
      IdeaModule module = plugin.getModel().getModule();
      module.setDownloadSources(policy.isDownloadSources());
      module.setDownloadJavadoc(policy.isDownloadJavadoc());
    });
  }
private static void setIdeaPluginDependencyDownloadPolicy(@NotNull Project project, @NotNull GradleDependencyDownloadPolicy policy)