Hey there everyone I had the same issue and found a clean way of solving this issue.
I am using two libraries that require annotation processing (Lombok and MapStruct).
Also my IntelliJ is 2019.1 (update yours in case it's older) and Gradle 5.2.1.
First let's configure IntelliJ:
- Disable Annotaion Processing in Settings, since we're going to delegate everything to Gradle:
- Delegeate IDE actions to Gradle:
Last step is to configure your dependencies correctly in Gradle.
- Dependencies section in Gradle:
Now you can execute the Build and Run from both command line and IDE.
Cheers!