Hello
I am using MapStruct annotation processor in my project to generate some code. So nothing in particular is required in the build.gradle
file apart from declaring the annotation processor:
implementation "org.mapstruct:mapstruct:${mapstructVersion}"
annotationProcessor "org.mapstruct:mapstruct-processor:${mapstructVersion}"
I turned on the parallel build feature of Gradle and now I am getting from time to time some error like this:
C:\git_clones\project\module\build\generated\sources\annotationProcessor\java\main\package\to\file\GeneratedFile.java:49: error: not a statement
List<SomeInterface>
^
C:\git_clones\project\module\build\generated\sources\annotationProcessor\java\main\package\to\file\GeneratedFile.java:49: error: reached end of file while parsing
List<SomeInterface>
^
But if I go to the GeneratedFile the file is valid. So my assumption is that Gradle somehow starts to compile the classes before the annotation processor is fully finished.
Is there a way to force the compile task to wait for the annotation processor to complete?