I tried to add the following to the root build.gradle
file:
subprojects {
gradle.projectsEvaluated {
tasks.withType(Compile) {
options.compilerArgs << "-Xlint:unchecked -Xlint:deprecation"
}
}
}
But I'm getting this:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':Libraries:ActionBarSherlock:compileRelease'.
> invalid flag: -Xlint:unchecked -Xlint:deprecation
What am I doing wrong?
This is what worked for me: (in your project's build.gradle)
allprojects {
gradle.projectsEvaluated {
tasks.withType(JavaCompile) {
options.compilerArgs << "-Xlint:unchecked" << "-Xlint:deprecation"
}
}
}