public static <M> void buildModelsRecursively(
    @NotNull BuildController controller,
    @NotNull GradleBuild buildModel,
    @NotNull Class<M> modelClass,
    @NotNull GradleModelConsumer consumer
  ) {
    @NotNull BasicGradleProject root = buildModel.getRootProject();
    GradleTreeTraverserUtil.breadthFirstTraverseTree(root, (gradleProject) -> {
      M model = controller.findModel(gradleProject, modelClass);
      if (model != null) {
        consumer.consumeProjectModel(gradleProject, model, modelClass);
      }
      return gradleProject.getChildren();
    });
  }
public static <M> void buildModelsRecursively(
    @NotNull BuildController controller,
    @NotNull GradleBuild buildModel,
    @NotNull Class<M> modelClass,
    @NotNull GradleModelConsumer consumer
  )