title: How to include java.desktop module as a library jar in Proguard
body: <p>I use proguard to obfuscate an application in Java 11 (latest LTS version) using the proguard gradle plugin. This is the dependency currently. I would like to comment that I have to use a version &gt;= 7.1.0-beta3 for other reasons that have to do with the project. However this issue is not related to that.</p>
  <pre><code> com.guardsquare:proguard-gradle:7.1.0-beta4
  </code></pre>
  <p>Recently a dependency on <code>interface</code> <a href="https://docs.oracle.com/javase/7/docs/api/javax/swing/tree/TreeNode.html" rel="nofollow noreferrer">javax.swing.tree.TreeNode module</a> was added.
  The <a href="https://docs.oracle.com/javase/7/docs/api/javax/swing/tree/TreeNode.html" rel="nofollow noreferrer">javax.swing.tree.TreeNode module</a> is part of the <a href="https://docs.oracle.com/en/java/javase/11/docs/api/java.desktop/module-summary.html" rel="nofollow noreferrer">java.desktop module</a>.</p>
  <p>I use the following code to include the JDK libraries in java version independent way.
  Following the <a href="https://github.com/Guardsquare/proguard/blob/master/examples/gradle/applications.gradle" rel="nofollow noreferrer">proguard examples</a>.</p>
  <pre><code>        if (System.getProperty('java.version').startsWith('1.')) {
              libraryjars &quot;${System.getProperty('java.home')}/lib/rt.jar&quot;
          } else {
              libraryjars &quot;${System.getProperty('java.home')}/jmods/java.base.jmod&quot;, jarfilter: '!**.jar', filter: '!module-info.class'
   }
  </code></pre>
  <p>However I get the following warning:</p>
  <pre><code>Warning: a.custom.CustomClass: can't find referenced class javax.swing.tree.TreeNode
  Execution failed for task ':obfuscation_task'.
  &gt; java.io.IOException: Please correct the above warnings first.
  </code></pre>
  <p>What does proguard need to 'see' the <code>javax.swing.tree.TreeNode</code> <code>class</code> as a libraryclass?</p>