Changes to align with Gradle 2.0

Updated sources and tests to be compatible with Gradle 2.0