Lombok在升级Gradle后停止工作。

huangapple go评论74阅读模式
英文:

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.

huangapple
  • 本文由 发表于 2020年9月26日 02:35:26
  • 转载请务必保留本文链接:https://go.coder-hub.com/64069661.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定