title: Gradle dagger lint: ignore by package
body: <p>I've created an Android project using Gradle. I've added a Dagger library:</p>
  
  <pre><code>dependencies {
      compile 'com.squareup.dagger:dagger-compiler:1.2.1'
      compile 'com.squareup.dagger:dagger:1.2.1'
  }
  </code></pre>
  
  <p>After trying to compile the project I get a build failure due to lint exceptions:</p>
  
  <pre><code>InvalidPackage: Package not included in Android
  </code></pre>
  
  <blockquote>
    <p>../../../../../../.gradle/caches/modules-2/files-2.1/com.squareup.dagger/dagger-compiler/1.2.1/c8bf6c2fda9b27f4d44a2aa4280df525a1408771/dagger-compiler-1.2.1.jar:
    Invalid package reference in library; not included in Android:
    javax.annotation.processing. Referenced from
    dagger.internal.codegen.GraphAnalysisErrorHandler.</p>
    
    <p>../../../../../../.gradle/caches/modules-2/files-2.1/com.squareup.dagger/dagger-compiler/1.2.1/c8bf6c2fda9b27f4d44a2aa4280df525a1408771/dagger-compiler-1.2.1.jar:
    Invalid package reference in library; not included in Android:
    javax.lang.model.type. Referenced from
    dagger.internal.codegen.GeneratorKeys.</p>
    
    <p>../../../../../../.gradle/caches/modules-2/files-2.1/com.squareup.dagger/dagger-compiler/1.2.1/c8bf6c2fda9b27f4d44a2aa4280df525a1408771/dagger-compiler-1.2.1.jar:
    Invalid package reference in library; not included in Android:
    javax.lang.model.util. Referenced from
    dagger.internal.codegen.GraphAnalysisErrorHandler.</p>
    
    <p>../../../../../../.gradle/caches/modules-2/files-2.1/com.squareup/javawriter/2.3.0/4b290e394ea3109be5c0b7f08ff75de089125122/javawriter-2.3.0.jar:
    Invalid package reference in library; not included in Android:
    javax.lang.model.element. Referenced from
    com.squareup.javawriter.JavaWriter.</p>
  </blockquote>
  
  <p>So, I have to either fix or make lint ignore Dagger packages. I've setup <code>lint.xml</code> but I can't figure out a way to ignore:</p>
  
  <pre><code> &lt;issue id="InvalidPackage"&gt;
    &lt;ignore ...INSERT DECLARATION TO IGNORE DAGGER PACKAGE... /&gt;
   &lt;/issue&gt;
  </code></pre>
  
  <p>Thanks.</p>