void (@NotNull Project project, boolean downloadSources, boolean downloadJavadocs) { project.getPlugins() .withType(IdeaPlugin.class, plugin -> { IdeaModule module = plugin.getModel().getModule(); module.setDownloadSources(downloadSources); module.setDownloadJavadoc(downloadJavadocs); }); }