Object (String modelName, Project project) { boolean resolveSourceSetDependencies = Boolean.parseBoolean(System.getProperty("idea.resolveSourceSetDependencies", "false")); if (!resolveSourceSetDependencies || !isIsNewDependencyResolutionApplicable()) return null; SourceSetContainer sourceSetContainer = JavaPluginUtil.getSourceSetContainer(project); if (sourceSetContainer == null) return null; ProjectDependenciesImpl dependencies = new ProjectDependenciesImpl(); for (SourceSet sourceSet : sourceSetContainer) { String compileConfigurationName = sourceSet.getCompileClasspathConfigurationName(); Configuration compileConfiguration = project.getConfigurations().findByName(compileConfigurationName); if (compileConfiguration == null) continue; String runtimeConfigurationName = sourceSet.getRuntimeClasspathConfigurationName(); Configuration runtimeConfiguration = project.getConfigurations().findByName(runtimeConfigurationName); if (runtimeConfiguration == null) continue; DependencyScopeNode compileScopeNode = reportGenerator.buildDependencyGraph(compileConfiguration, project); DependencyScopeNode runtimeScopeNode = reportGenerator.buildDependencyGraph(runtimeConfiguration, project); if (!compileScopeNode.getDependencies().isEmpty() || !runtimeScopeNode.getDependencies().isEmpty()) { dependencies.add(new ComponentDependenciesImpl(sourceSet.getName(), compileScopeNode, runtimeScopeNode)); } } return dependencies.getComponentsDependencies().isEmpty() ? null : dependencies; }