示例#1
0
  @SuppressWarnings("StringBufferReplaceableByString")
  String createDiagnosticsMessage(
      String trailingMessage, GradleExecutionResult gradleExecutionResult) {
    String lineBreak = SystemProperties.getInstance().getLineSeparator();
    StringBuilder message = new StringBuilder();
    message.append(trailingMessage);
    message.append(" in ");
    message.append(getProjectDir().getAbsolutePath());
    message.append(" with arguments ");
    message.append(getArguments());

    String output = gradleExecutionResult.getOutput();
    if (output != null && !output.isEmpty()) {
      message.append(lineBreak);
      message.append(lineBreak);
      message.append("Output:");
      message.append(lineBreak);
      message.append(output);
    }

    return message.toString();
  }
示例#2
0
 private BuildResult createBuildResult(GradleExecutionResult execResult) {
   return new DefaultBuildResult(execResult.getOutput(), execResult.getTasks());
 }