@Test
public void xmlError2() throws Exception {

  // XML error; Added "<" on separate line; new gradle output format (using MergingException)
  createTempXmlFile();
  String output =
    "Relying on packaging to define the extension of the main artifact has been deprecated and is scheduled to be removed in Gradle 2.0\n" +
    ":MyApplication:preBuild UP-TO-DATE\n" +
    ":MyApplication:preDebugBuild UP-TO-DATE\n" +
    ":MyApplication:preReleaseBuild UP-TO-DATE\n" +
    ":MyApplication:prepareComAndroidSupportAppcompatV71800Library UP-TO-DATE\n" +
    ":MyApplication:prepareDebugDependencies\n" +
    ":MyApplication:compileDebugAidl UP-TO-DATE\n" +
    ":MyApplication:compileDebugRenderscript UP-TO-DATE\n" +
    ":MyApplication:generateDebugBuildConfig UP-TO-DATE\n" +
    ":MyApplication:mergeDebugAssets UP-TO-DATE\n" +
    ":MyApplication:mergeDebugResources\n" +
    "[Fatal Error] :5:2: The content of elements must consist of well-formed character data or markup.\n" +
    sourceFilePath + ":4:1: Error: The content of elements must consist of well-formed character data or markup.\n" +
    ":MyApplication:mergeDebugResources FAILED\n" +
    "\n" +
    "FAILURE: Build failed with an exception.\n" +
    "\n" +
    "* What went wrong:\n" +
    "Execution failed for task ':MyApplication:mergeDebugResources'.\n" +
    "> " + sourceFilePath + ":4:1: Error: The content of elements must consist of well-formed character data or markup.\n" +
    "\n" +
    "* Try:\n" +
    "Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.\n" +
    "\n" +
    "BUILD FAILED\n" +
    "\n" +
    "Total time: 5.187 secs";
  assertEquals("0: Simple::MyApplication:preBuild UP-TO-DATE\n" +
               "1: Simple::MyApplication:preDebugBuild UP-TO-DATE\n" +
               "2: Simple::MyApplication:preReleaseBuild UP-TO-DATE\n" +
               "3: Simple::MyApplication:prepareComAndroidSupportAppcompatV71800Library UP-TO-DATE\n" +
               "4: Simple::MyApplication:prepareDebugDependencies\n" +
               "5: Simple::MyApplication:compileDebugAidl UP-TO-DATE\n" +
               "6: Simple::MyApplication:compileDebugRenderscript UP-TO-DATE\n" +
               "7: Simple::MyApplication:generateDebugBuildConfig UP-TO-DATE\n" +
               "8: Simple::MyApplication:mergeDebugAssets UP-TO-DATE\n" +
               "9: Simple::MyApplication:mergeDebugResources\n" +
               "10: Error:The content of elements must consist of well-formed character data or markup.\n" +
               "11: Error:Error: The content of elements must consist of well-formed character data or markup.\n" +
               "\t" + sourceFilePath + ":4:1\n" +
               "12: Simple::MyApplication:mergeDebugResources FAILED\n" +
               "13: Error:Execution failed for task ':MyApplication:mergeDebugResources'.\n" +
               "> " + sourceFilePath + ":4:1: Error: The content of elements must consist of well-formed character data or markup.\n" +
               "14: Info:BUILD FAILED\n" +
               "15: Info:Total time: 5.187 secs\n",
               toString(parser.parseGradleOutput(output)));
  sourceFile.delete();
}