Removed Deprecation Warnings

Removed deprecation warnings by using newer API which has been introduced in Gradle 1.6.