title: How to add -Xlint:unchecked to my Android Gradle based project?
body: <p>I tried to add the following to the root <code>build.gradle</code> file:</p>
  
  <pre><code>subprojects {
      gradle.projectsEvaluated {
          tasks.withType(Compile) {
              options.compilerArgs &lt;&lt; "-Xlint:unchecked -Xlint:deprecation"
          }
      }
  }
  </code></pre>
  
  <p>But I'm getting this:</p>
  
  <pre><code>FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':Libraries:ActionBarSherlock:compileRelease'.
  &gt; invalid flag: -Xlint:unchecked -Xlint:deprecation
  </code></pre>
  
  <p>What am I doing wrong?</p>