title: How do I include com.sun.tools JAR in my Gradle JAR classpath buildscript and also sync with my IDE?
body: <p>I need the com.sun.tools jar as a compile dependency, so I just copied it to my libs folder in my Intellij project.  However, I'm trying to use gradle.  I only need it as a dependency for ONE of my modules.  How do I do this.  I currently have this in my module jar task:</p>
  
  <pre><code>jar {
  
      from('build/classes/main/')
      from('libs/tools.jar')
  
      manifest {
          attributes 'Manifest-Version': '1.0',
                  'Class-Path': configurations.runtime.files.collect {"../lib/${it.name}" },
  }
  </code></pre>
  
  <p>I also tried this in my module's "dependencies" closure:</p>
  
  <pre><code> compile fileTree(dir: 'lib', include: '*.jar')
  </code></pre>
  
  <p>I also just tried putting the jar on my entire project classpath and it's still not compiling:</p>
  
  <pre><code>    classpath ":tools"
  </code></pre>
  
  <p>Maybe it's correct but my IDE isn't refreshing correctly? I have the plugin already </p>
  
  <pre><code>apply plugin: 'idea'
  </code></pre>
  
  <p>and it's been working perfectly until I try to do this. </p>
  
  <p>EDIT: it's for an annotation processor, so I'm trying to include it in my module jar build and not have other modules depend on it.  Is there a better way to do it than copying the jar?</p>