title: How to create a Jandex index in Quarkus for classes in a external module for Gradle
body: <p>Based on the following maven configuration from <a href="https://stackoverflow.com/questions/55513502/how-to-create-a-jandex-index-in-quarkus-for-classes-in-a-external-module">this SO question, answered for Maven builds</a>, I need an equivalent bit of code for a Gradle setup. Looking around, I can't find a setup that does this for Gradle. </p>
  
  <p>Synopsis of issue from other question: Essentially that classes from external projects aren't indexed so that Quarkus can use them. The solution below rebuilds the index and allows access to the classes.</p>
  
  <p>Code from other question:</p>
  
  <pre><code>&lt;build&gt;
    &lt;plugins&gt;
      &lt;plugin&gt;
        &lt;groupId&gt;org.jboss.jandex&lt;/groupId&gt;
        &lt;artifactId&gt;jandex-maven-plugin&lt;/artifactId&gt;
        &lt;version&gt;1.0.6&lt;/version&gt;
        &lt;executions&gt;
          &lt;execution&gt;
            &lt;id&gt;make-index&lt;/id&gt;
            &lt;goals&gt;
              &lt;goal&gt;jandex&lt;/goal&gt;
            &lt;/goals&gt;
          &lt;/execution&gt;
        &lt;/executions&gt;
      &lt;/plugin&gt;
    &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>Also... after more digging, it appears that there might already be a fix in the works <a href="https://github.com/quarkusio/quarkus/pull/2906" rel="noreferrer">here (github merge request</a>. At time of writing, this is merged but doesn't look like it is part of a release. Will follow up if this changes, and if it fixes ths issue.</p>
  
  <h1>Update:</h1>
  
  <p>With the release of <code>0.18.0</code>, I am still having issues, but I believe I am closer. I still get the following (very similar) error:</p>
  
  <pre><code>2019-06-27 19:45:52,741 INFO  [io.qua.dep.QuarkusAugmentor] (main) Beginning quarkus augmentation
  2019-06-27 19:45:53,241 WARN  [io.qua.dep.ste.ReflectiveHierarchyStep] (build-8) Unable to properly register the hierarchy of the following classes for reflection as they are not in the Jandex index:
  - com.ebp.reasonadle.shared.pojos.user.User
  Consider adding them to the index either by creating a Jandex index for your dependency via the Maven plugin, an empty META-INF/beans.xml or quarkus.index-dependency properties.");.
  </code></pre>
  
  <p>This is with the empty <code>beans.xml</code>, and at this point I am unsure how to attempt the entries in application.properties.</p>
  
  <p>Entries suggested in other question:</p>
  
  <pre><code>quarkus.index-dependency.&lt;name&gt;.group-id=
  quarkus.index-dependency.&lt;name&gt;.artifact-id=
  quarkus.index-dependency.&lt;name&gt;.classifier=(this one is optional)
  </code></pre>
  
  <p>I am confused as for what the placeholder <code>&lt;name&gt;</code> is supposed to be. Classname? Gradle project name? Also I assume the empty assignments are intentional?</p>
  
  <p>The structure of my overall gradle project:</p>
  
  <pre><code>| Main
  | \ (API folder)
  |  | User API (Quarkus Project, pulls in pojos)
  | \ (Common resource folder)
  |  | Common pojo's (Java library, done with Gradle's plugin)
  </code></pre>
  
  <p>For the Quarkus devs viewing this, I would argue that this shouldn't be necessary. Sharing pojos between projects is quite common, and what I would call good design. Maybe a quickstart is in order for explaining how to make this work?</p>