Sunday, 8 September 2013

How to add -Xlint:unchecked to my Android Gradle based project?

How to add -Xlint:unchecked to my Android Gradle based project?

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?

No comments:

Post a Comment