UPDATE: This is now available as a plugin https://github.com/tbroyer/gradle-errorprone-plugin
To use it, just add the following to your build.gradle
and it'll change all JavaCompile
tasks to use the error-prone compiler:
apply from: 'https://gist.github.com/tbroyer/6847494/raw/errorprone.gradle'