英文:
gradle 6.4 build with lombok 1.18.12 not generating getters and setter
问题
Tried adding
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
and specified version in versions.gradle
lombokVersion="1.18.12"
Still compilation is failing with missing getter/setters.
Used --debug option and extracted arguments passed to java compiler and executed with javac and compilation went fine.
Tried overriding java compiler option via gradle command line option and via following properties
compileJava.options.fork = true
compileJava.options.forkOptions.executable = '/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin/javac'
Still no luck. It still seems to be using internal groovy compiler org.gradle.api.internal.tasks.compile.JdkJavaCompiler
Anyone ran into similar issue?
英文:
Tried adding
compileOnly 'org.projectlombok:lombok'
annotationProcessor 'org.projectlombok:lombok'
and specified version in versions.gradle
lombokVersion="1.18.12"
Still compilation is failing with missing getter/setters.
Used --debug option and extracted arguments passed to java compiler and executed with javac and compilation went fine.
Tried overriding java compiler option via gradle command line option and via following properties
compileJava.options.fork = true
compileJava.options.forkOptions.executable = '/Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/bin/javac'
Still no luck. It still seems to be using internal groovy compiler org.gradle.api.internal.tasks.compile.JdkJavaCompiler
Anyone ran into similar issue?
答案1
得分: 0
已将Lombok依赖项添加到common/build.gradle中:
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
testCompileOnly 'org.projectlombok:lombok:1.18.12'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
英文:
Added lombok dependencies to common/build.gradle
compileOnly 'org.projectlombok:lombok:1.18.12'
annotationProcessor 'org.projectlombok:lombok:1.18.12'
testCompileOnly 'org.projectlombok:lombok:1.18.12'
testAnnotationProcessor 'org.projectlombok:lombok:1.18.12'
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论