private static @NotNull ProjectIdentifier getProjectIdentifier(@NotNull ProjectModel project) {
    ProjectIdentifier projectIdentifier;
    if (project instanceof IdeaModule) {
      // do not use IdeaModule#getProjectIdentifier, it returns project identifier of the root project
      projectIdentifier = ((IdeaModule)project).getGradleProject().getProjectIdentifier();
    }
    else {
      projectIdentifier = project.getProjectIdentifier();
    }
    return projectIdentifier;
  }
private static @NotNull ProjectIdentifier getProjectIdentifier(@NotNull ProjectModel project)