Support Gradle 2.1

This removes support for Gradle 1.x.
Gradle 2.0 is not supported as it lacks APIs to manipulate the actual
compiler being used.