title: Add library to build path with Gradle
body: <p>I have added <code>java.smartcardio</code> library via <code>right click &gt; Build Path &gt; Configure Build Path &gt; Module Dependencies</code> manually to my Eclipse project.</p>
  <p>Anyway, after <code>right click &gt; Gradle &gt; Refresh Gradle Project</code> the library gets removed again from build path.</p>
  <p>.classpath when working:</p>
  <pre><code>...
  &lt;classpathentry ...&gt;
    &lt;attributes&gt;
      &lt;attribute name=&quot;module&quot; value=&quot;true&quot;/&gt;
      &lt;attribute name=&quot;limit-modules&quot; value=&quot;java.se,jdk.accessibility,jdk.httpserver,jdk.jartool,jdk.javadoc,jdk.jconsole,jdk.jshell,jdk.jsobject,jdk.management.jfr,jdk.naming.ldap,jdk.net,jdk.scripting.nashorn,jdk.sctp,jdk.security.auth,jdk.security.jgss,jdk.unsupported,jdk.unsupported.desktop,jdk.xml.dom,java.smartcardio&quot;/&gt;
    &lt;/attributes&gt;
  &lt;/classpathentry&gt;
  ...
  </code></pre>
  <p>.classpath after refreshing Gradle:</p>
  <pre><code>...
  &lt;classpathentry ...&gt;
  &lt;/classpathentry&gt;
  ...
  </code></pre>
  <p>Setting limit-modules manually in project.gradle like</p>
  <pre><code>eclipse {
      classpath {
          file {
              whenMerged {
                  def jre = entries.find { it.path.contains 'org.eclipse.jdt.launching.JRE_CONTAINER' }
                  jre.entryAttributes['module'] = 'true'
                  jre.entryAttributes['limit-modules'] = 'java.se,java.smartcardio'           
              }
          }
      }
  }
  </code></pre>
  <p>did not work, because strangly every developer has limit-modules filled differently when added the library manually.</p>
  <p>Any hint how to solve that permanently?</p>
  <p>Edit: I found this thread <a href="https://github.com/eclipse/buildship/issues/760" rel="nofollow noreferrer">https://github.com/eclipse/buildship/issues/760</a>, which is describing the same issue but did not solve the problem for me.</p>