title: Added external static library in IntelliJ Java project that Gradle doesn't see
body: <p>I want to build a static library as a jar, so that it can be included into my project (without the need to compile it within our project).</p>
  
  <p>I built a static library (with java and ant references valid):</p>
  
  <pre><code>cmake -DBUILD_SHARED_LIBS=OFF ..
  build -j8
  </code></pre>
  
  <p>In IntelliJ, I referenced the .jar file as a dependency:
  ProjectStructure > Modules > Dependencies > Add Jar (scope = compile)</p>
  
  <p>The file shows up in External Libraries as expected.  Code completion works, e.g.  <code>import org.opencv.core.Core;</code> is found.</p>
  
  <p>I noticed that unlike other External Libraries, this one doesn't have a "Gradle:" prefix.</p>
  
  <p>When I build, I get an error:</p>
  
  <pre><code>/Users/tj/Documents/projects/myProject/src/main/java/edu/wpi/cscore/CameraServerJNI.java:17: 
  error: package org.opencv does not exist
  import org.opencv.core;
  </code></pre>
  
  <p>Did I miss a step?
  <a href="https://i.stack.imgur.com/LC0R9.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/LC0R9.png" alt="External Libraries"></a></p>
  
  <p>build.gradle:
  <a href="https://i.stack.imgur.com/fWYfL.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fWYfL.png" alt="enter image description here"></a></p>