Remove deprecated use of Compile to work with Gradle 2.0+

The class Compile was deprecated and will be removed in Gradle 2.0 (it is
already removed in the release canidate).

Instead we should use JavaCompile.