Build success reported followed by a build failure with Gradle 2.2.1 and Android Gradle Plugin 1.0.+

I am upgrading some projects to Gradle 2.2.1 and have run into a very confusing situation. Gradle says my build is successful and then immediately reports an error:

BUILD SUCCESSFUL

Total time: 49.585 secs

FAILURE: Build failed with an exception.

  • What went wrong:

Failed to notify build listener.

The build log can be found at: https://gist.github.com/pajatopmr/2990f55161b17e1288ba

Since the project builds cleanly prior to the upgrade, it would seem that the issue is either a Gradle bug or an ungraceful way for Gradle to let me know that the more recent version has an issue with my project.

Hard to know how to proceed, so I am looking for suggestions to help get to a clean, successful build.

-pmr