Tarun Chaudhary
Tarun Chaudhary

Reputation: 31

Compile error with lombok in intellij - only when running build

I am facing a weird error when running gradle build in intellij using lombok. Lombok is not resolving getters and setters during running the build. although im not seeing any compilation error in intellij its only appearing when im running build.

Please note that

I have enabled Annotation Processing

I have installed Lombok Plugin

I have added @Data @Builder on the class

annotation processors settings

Lombok plugin description

build errors image

Upvotes: 0

Views: 965

Answers (1)

Tarun Chaudhary
Tarun Chaudhary

Reputation: 31

I added dependencies as below and solved my problem

compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'

Earlier it was just compile 'org.projectlombok:lombok'

Upvotes: 3

Related Questions