@Nullable
  private static DefaultExternalProject readProject(@NotNull IonReader reader, @NotNull ReadContext context) {
    if (reader.next() == null) return null;
    reader.stepIn();

    DefaultExternalProject project =
      context.getProjectsMap().computeIfAbsent(readInt(reader, OBJECT_ID_FIELD), new ObjectFactory<DefaultExternalProject>() {
        @Override
        public DefaultExternalProject newInstance() {
          return new DefaultExternalProject();
        }

        @Override
        public void fill(DefaultExternalProject externalProject) {
          externalProject.setExternalSystemId("GRADLE");
          externalProject.setId(assertNotNull(readString(reader, PROJECT_ID_FIELD)));
          externalProject.setPath(assertNotNull(readString(reader, PROJECT_PATH_FIELD)));
          externalProject.setIdentityPath(assertNotNull(readString(reader, PROJECT_IDENTITY_PATH_FIELD)));
          externalProject.setName(assertNotNull(readString(reader, PROJECT_NAME_FIELD)));
          externalProject.setQName(assertNotNull(readString(reader, PROJECT_Q_NAME_FIELD)));
          externalProject.setDescription(readString(reader, PROJECT_DESCRIPTION_FIELD));
          externalProject.setGroup(assertNotNull(readString(reader, PROJECT_GROUP_FIELD)));
          externalProject.setVersion(assertNotNull(readString(reader, PROJECT_VERSION_FIELD)));
          externalProject.setProjectDir(assertNotNull(readFile(reader, PROJECT_DIR_FIELD)));
          externalProject.setBuildDir(assertNotNull(readFile(reader, PROJECT_BUILD_DIR_FIELD)));
          externalProject.setBuildFile(assertNotNull(readFile(reader, PROJECT_BUILD_FILE_FIELD)));
          externalProject.setSourceSetModel(readSourceSetModel(reader, context));
          externalProject.setTaskModel(readTaskModel(reader));
          externalProject.setChildProjects(readChildProjects(reader, context));
        }
      });
    reader.stepOut();
    return project;
  }
@Nullable
  private static DefaultExternalProject readProject(@NotNull IonReader reader, @NotNull ReadContext context)