Closed oldfishdk closed 2 years ago
Hey! You just have to add lombok annotation processor to jmh sourceset dependencies:
dependencies {
// this adds lombok to your "main" sourceset only
annotationProcessor 'org.projectlombok:lombok:1.18.20'
implementation 'org.projectlombok:lombok:1.18.20' // you may want to use compileOnly instead of implementation, althougt it works as well
// this adds lombok to "jmh" sourceset as well
jmhCompileOnly 'org.projectlombok:lombok:1.18.20'
jmhAnnotationProcessor 'org.projectlombok:lombok:1.18.20'
}
Much thanks for the help and confirmed it works now. And hence closing the issue.
I am trying to run jmh but turns out it does not work well with the Lombok annotator and I am not sure if any specific tweaks needs to be applied. To reproduce you could use following
build.gralde
:together following source code (or any code that uses the SneakyThrows):
And my gralde version is 7.1.1
Much thanks for any suggestions or comments!