I have a build.gradle file with dependencies { classpath \'com.android.tools.build:gradle:0.13.3\'} and apply plugin: \'com.android.applicati
I tried the solution posed by @Konrad Jamrozik but it didn't work with my project due to flavours in my project.
Given that we're just turning on additional warnings, not something that's significantly changing how the compiler operates, I don't see it being an issue that it will be added to both release and debug builds. As such, this answer has a cleaner method that works with flavours: How to add -Xlint:unchecked to my Android Gradle based project?
In my case, adding this to the build.gradle file of the affected module:
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}