英文:
Lombok stops working after gradle upgrade
问题
我的 build.gradle
包含依赖项:
...
testCompile group: 'org.projectlombok', name: 'lombok', version: '1.18.12'
...
当我将 Gradle 从 4.9
升级到 6.6.1
时,我遇到了错误:
required: no arguments
found: ...
reason: actual and formal argument list differ in length
所有使用 @AllArgsConstructor
的类在 compileTestJava
Gradle 步骤中失败。有人知道为什么吗?
英文:
My build.gradle
contains dependency:
...
testCompile group: 'org.projectlombok', name: 'lombok', version: '1.18.12'
...
When I upgrade my gradle from 4.9
to 6.6.1
I get errors:
required: no arguments
found: ...
reason: actual and formal argument list differ in length
All my classes that use @AllArgsConstructor
are failing on compileTestJava
gradle step. Anyone has a clue why?
答案1
得分: 1
你还应该在 testAnnotationProcessor
中添加 lombok :
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
根据你的需要调整版本号。
英文:
You should also add lombok in testAnnotationProcessor
:
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
Also adjust the version as you need.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论