boolean (@NotNull Project project) { // this is necessary for the explicit 'Download sources' action, and also to ensure that sources can be disabled for the headless idea // regardless of user settings String forcePropertyValue = System.getProperty(DOWNLOAD_SOURCES_FORCE_PROPERTY_NAME); if (forcePropertyValue != null) { return Boolean.parseBoolean(forcePropertyValue); } // we should respect project level settings declared in the 'build.gradle' file IdeaPlugin ideaPlugin = findIdeaPlugin(project); if (ideaPlugin != null) { return ideaPlugin.getModel().getModule().isDownloadSources(); } // default IDE policy return Boolean.parseBoolean(System.getProperty(DOWNLOAD_SOURCES_PROPERTY_NAME, "false")); }