To avoid warnings regarding special characters when building my Java source code, I put this line in my gradle.build which worked fine before upgrading to Gradle 2.
gradle.build
Changing the line to
tasks.withType(JavaCompile) { options.encoding = "UTF-8" }
fixed the issue.