I am migrating my project from Maven to Gradle and i have a Java Class that i need to have compiled before the rest of the project. This class creates a file that will be used by the project. Does anyone have an idea how to accomplish this task? Thanks
Edit:
The following is the Maven solution:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<configuration>
<release>11</release>
</configuration>
<executions>
<execution>
<id>default-compile</id>
<configuration>
<compilerArgument>-proc:none</compilerArgument>
<includes>
<include>PATH/TO/CLASS/AnnotationProcessor.java</include>
</includes>
</configuration>
</execution>
<execution>
<id>compile-project</id>
<phase>compile</phase>
<goals>
<goal>compile</goal>
</goals>
</execution>
</executions>
</plugin>
The AnnotationProcessor scrapes and stores all annotation data that the project declares. This class is supposed to be compiled before the rest of the project. At least that is what the comment section says.