GradleConfigurationReportModel (@NotNull String modelName, Project project, @NotNull ModelBuilderContext context) { List<GradleConfigurationReportModel.Configuration> configurations = new ArrayList<>(project.getConfigurations().size()); for (Configuration configuration : project.getConfigurations()) { List<GradleConfigurationReportModel.Dependency> dependencies = new ArrayList<>(configuration.getDependencies().size()); for (Dependency dependency : configuration.getDependencies()) { String group = dependency.getGroup(); String version = dependency.getVersion(); if (group == null || version == null) continue; dependencies.add(new GradleConfigurationReportModelImpl.DependencyImpl(group, dependency.getName(), version)); } configurations.add(new GradleConfigurationReportModelImpl.ConfigurationImpl(configuration.getName(), dependencies)); } return new GradleConfigurationReportModelImpl(project.getProjectDir().getAbsolutePath(), configurations); }