Annotation Processors Issue: IntelliJ project Rebuild linked to multiple root Gradle projects fails

Answered

Hi,

I have encountered an issue/feature related to annotation processors imported from multiple Gradle project. Specifically, I have two root Gradle projects. 

 

Both projects declare the Lombok annotation processor in their Gradle configurations. However, when attempting to rebuild the entire project structure in IntelliJ, I face a problem. I need all projects to be rebuilt, but one of them is missing the annotation processor. 

It is probably caused by importing annotation processors from only one of the Gradle projects. I can check this out in Settings/Build,Execution,Deployment/AnnotationProcessors. Which annotation processors are used depends on which projects is reloaded first.   

For practicality, I'd prefer to have both projects within a single IntelliJ project structure. How should I address this issue? Should I split the Gradle projects into two separate IntelliJ projects, or is there another solution available?

Is there a way to achieve a state where all annotation processors from all the Gradle projects are imported?

EDIT: My workaround is also to build the project after reloading Gradle projects with a specific order.

Thank you.

0
1 comment

Hello,

Seems we have similar report on YouTrack: https://youtrack.jetbrains.com/issue/IDEA-230337

Sorry, no exact ETA yet.

1

Please sign in to leave a comment.