DefaultExternalProject ( @NotNull Project project, @NotNull ModelBuilderContext context ) { String projectPath = project.getPath(); String projectName = project.getName(); String projectIdentityPath = GradleObjectUtil.notNull(getProjectIdentityPath(project), projectPath); String ideaModuleName = GradleObjectUtil.notNull(getIdeaModuleName(project), projectName); DefaultExternalProject externalProject = new DefaultExternalProject(); externalProject.setExternalSystemId("GRADLE"); externalProject.setName(projectName); externalProject.setQName(":".equals(projectPath) ? projectName : projectPath); externalProject.setId(":".equals(projectIdentityPath) ? ideaModuleName : projectIdentityPath); externalProject.setPath(projectPath); externalProject.setIdentityPath(projectIdentityPath); externalProject.setVersion(wrap(project.getVersion())); externalProject.setDescription(project.getDescription()); externalProject.setBuildDir(project.getBuildDir()); externalProject.setBuildFile(project.getBuildFile()); externalProject.setGroup(wrap(project.getGroup())); externalProject.setProjectDir(project.getProjectDir()); externalProject.setTasks(getTasks(project, context)); externalProject.setSourceSetModel(getSourceSetModel(project, context)); return externalProject; }