private static Promise<ProjectTaskManager.Result> build(List<Module> modules, ProjectTaskManager projectTaskManager) {
    return modules.isEmpty() ? projectTaskManager.buildAllModules() : projectTaskManager.build(modules.toArray(Module.EMPTY_ARRAY));
  }
private static Promise<ProjectTaskManager.Result> build(List<Module> modules, ProjectTaskManager projectTaskManager)