I am trying to figure out why build warnings only show up during the first build where the code is introduced. I am seeing it with compile warnings for Lombok but am not sure if it is exclusively Lombok. For example, I created a new class with the @Builder annotation that has a field with a value. This is the warning that I get when I run ./gradlew build:
warning: @Builder will ignore the initializing expression entirely. If you want the initializing expression to serve as default, add @Builder.Default. ...
That warning only shows up the first time I run build. Subsequent builds show no warnings. I have tried closing the Gradle Daemon, deleting the .gradle directory, deleting my build/output directories, and running in a new terminal. I even upgraded from Gradle 4.8.1 to 5.4.1. The only way I can get the warnings with subsequent builds is to change the Java code in the affected class or create new classes that generates the warnings.
Is this the expected behavior? How can I compile and see the warnings again?