ビルド時にすべての Reflections メタデータを保存する方法を示すスニペットがあり、ブートストラップ時間が短縮されます。問題はMavenを使用していて、Gradleでこれをやりたいということです。このMaven構成をGradle構成に変換するのを手伝ってもらえますか?
<build>
<plugins>
<plugin>
<groupId>org.reflections</groupId>
<artifactId>reflections-maven</artifactId>
<version>the latest version...</version>
<executions>
<execution>
<goals>
<goal>reflections</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
</plugin>
</plugins>
</build>
また、githubには別のスニペットがあります。
<plugin>
<groupId>org.codehaus.gmavenplus</groupId>
<artifactId>gmavenplus-plugin</artifactId>
<version>1.5</version>
<executions>
<execution>
<phase>generate-resources</phase>
<goals>
<goal>execute</goal>
</goals>
<configuration>
<scripts>
<script><![CDATA[
new org.reflections.Reflections("f.q.n")
.save("${project.build.outputDirectory}/META-INF/reflections/${project.artifactId}-reflections.xml")
]]></script>
</scripts>
</configuration>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.reflections</groupId>
<artifactId>reflections</artifactId>
<!-- use latest version of Reflections -->
<version>0.9.10</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<!-- any version of Groovy \>= 1.5.0 should work here -->
<version>2.4.3</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</plugin>
私は実際に何をする必要があるのか よくわかりません。