title: Intellij Plugin Development - Gradle does not find dependency of IntelliJ
body: <p>I am currently developing a plugin for IntelliJ and trying to use another built-in IntelliJ Plugin as dependency (git4idea). As described in the IntelliJ Plugin Development documentation, I added the required JARs to my class Path in Project Structure:
  <a href="https://i.stack.imgur.com/CCHqi.png" rel="noreferrer">Project Structure Dialog Screenshot</a></p>
  
  <p>I also added <code>&lt;depends&gt;Git4Idea&lt;/depends&gt;</code> to my plugin.xml file.</p>
  
  <p>IntelliJ finds these jars now and Code Completion works well, no errors found...
  But when I try to build the Plugin with gradle I get ClassNotFound errors or errors like this:</p>
  
  <pre><code>TkGitflowBaseImpl.java:15: error: package git4idea.commands does not exist
  import git4idea.commands.Git;
                          ^
  </code></pre>
  
  <p>Obviously, Gradle does not find these jars. Since they are part of the IntelliJ installation, I can't just add them to a lib folder and add them as local jars in the build.gradle file. As Gradle JVM, I chose the exact same JVM I chose as JVM behind the IDEA Platform SDK, so the jars should be available to Gradle.</p>
  
  <p>Do you know how I can help Gradle find these jars or add them as "provided" dependencies without adding them to a lib folder?</p>
  
  <p>I am using IntelliJ IDEA 2017.2.5 and Gradle 4.2.1</p>