Unknown property generateLombokConfig.enabled after ugrading gradle from 6.9 to 7.3 - gradle

I have a property called generateLombokConfig.false in the code which I received.
The code was built for java 8. Now am upgrading it for Java 17. When I upgrade to Java 16 compatible version of Gradle (7.3) , Lombok (6.3), the code fails to build with error
Could not get unknown property 'generateLombokConfig' for root project 'myapp' of type org.gradle.api.Project
Is this property deprecated? Is it safe to remove ? I dont find any information in the docs.

Looks like it is deprecated and removed from the latest Lombok version. No helpful documentation apart from this javadoc

Related

Gradle 6.8 to 7 version update in a spring-boot application

d:\myProject>gradlew build --warning-mode all
> Task :compileJava UP-TO-DATE
Property 'options.compilerArgumentProviders.apt$0.name' is not annotated with an input or
output annotation. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0.
See https://docs.gradle.org/6.8/userguide/more_about_tasks.html#sec:up_to_date_checks
for more details.
Property 'options.compilerArgumentProviders.apt$0.publicType' is not annotated with an
input or output annotation. This behaviour has been deprecated and is scheduled to be removed in Gradle 7.0.
See https://docs.gradle.org/6.8/userguide/more_about_tasks.html#sec:up_to_date_checks
for more details.
I have tried removing the generic plugin (id "net.ltgt.apt") and the IntelliJ (id "net.ltgt.apt-idea") plugin as suggested by #Bjørn Vester(https://www.linkedin.com/in/bjornvester/), but the code is giving same error.
I am trying to update gradle from 6.8 to 7.5 version.
Can anyone help?
First things first,
As #Bjørn Vester said you need to remove the the below lines from build.gradle
id "net.ltgt.apt-eclipse" version "0.21"
id "net.ltgt.apt-idea" version "0.21"
id "net.ltgt.apt" version "0.21"
and add eclipse support by adding below line,
id "com.diffplug.eclipse.apt" version "3.36.2"
and also update the version of
id "com.diffplug.eclipse.apt" to latest.
As on the date of writing this answer the version was 3.36.2

How do I get gradle 7 to work in IntelliJ IDEA?

I am having some troubles with setting up a project with gradle 7.1. I can't go below 7 because Fabric Loom 0.8+ needs gradle 7+.
The Intellij IDEA log: https://controlc.com/1c0be753
Using Gradle 7.1 and Java 16
See the related comment in IntelliJ IDEA bug tracker and this bug request on Gradle GitHub. The exception could be caused by the filesystem (FAT) and is fixed in Gradle 7.2

"unable to resolve class" error after upgrading gradle 3 to gradle 4

Grails version: 3.2.9
Gradle initial version: 3.4.1 (everything works fine with this version)
Gradle upgraded version:4.10.3
Plugin: org.grails.grails-gsp
When I run gradlew war after upgrading gradle version to 4.10.3 I start to get the following error during execution of compileGroovyPages task:
dashboard_gsp.groovy: 2: unable to resolve class com.abnd.CarStatusEnum
# line 2, column 1.
import com.abnd.CarStatusEnum
^
Location of class com.abnd.CarStatusEnum is src/main/groovy/com/abnd/CarStatusEnum in the same project where the build is being run and gradlew war task completes successfully with gradle version 3.4.1. However when I upgrade gradle version to 4.10.3 then I start to get this error. Same happens with gradle version 4.1.
1) Any clue what can be the problem ?
2) Is that a good idea to use gradle version 4.x.x or 5.x.x with grails version 3.x.x as with gradle 5.x.x I start to get even more issues as some grails plugins(like grails-gsp v3.3.2 which is latest stable version) use some features that have been deprecated in gradle 4.x.x and removed from gradle 5.x.x (see the error bellow)?
Failed to apply plugin [id 'org.grails.grails-gsp']
Could not get unknown property 'classesDir' for main classes of type org.gradle.api.internal.tasks.DefaultSourceSetOutput.
1) Any clue what can be the problem ?
Yes. The error message is a clue that the GSP compiler can't find the enum class. This is because our plugin isn't compatible with Gradle 4.10.3.
2) Is that a good idea to use gradle version 4.x.x or 5.x.x with
grails version 3.x.x
No. Those Gradle versions are not supported with the version of Grails you are using.
I hope that helps.

java.lang.ExceptionInInitializerError is produced when lombok is used within a Spring-boot application

When I am using lombok within a spring-boot application java: java.lang.ExceptionInInitializerError is produced. What can I do to prevent this error?
What have I done?
I've installed lombok plugin in IntelliJ and restarted it after installing plugin.
I've enabled Annotation Processors from both
File->Setting and Filer->Other Setting->Default-> setting->Build, Execution and deployment->Compiler->Annotation Processors
File->Setting and Filer->Setting->Build, Execution and deployment->Compiler->Annotation Processors
I've also tried to change the scope of dependency in the pom.xml to 'provided'
I tried other versions of lombok such as 1.16.21, 1.14 and ... but when I change the version other errors occur (For example when I change the version to the 1.16.16, Compiler says 'java package lombok dose not exists.')
Errors with different versions:
1.16.21: java.lang.ExceptionInInitializerError
1.16.20: java.lang.ExceptionInInitializerError
1.16.19: java.lang.ExceptionInInitializerError
ver < 1.16.18: java: package lombok does not exist
other info:
JDK: 10
Spring-boot: 2.0.2.RELEASE
OS: Windows and Linux
The amount of boilerplate code (setter and getters) is really high in my code, and I really need lombok what can I do to use it?
.
The problem has been solved in Lombok version 1.18.0
There is known issue with lombok and Java 10: https://github.com/rzwitserloot/lombok/issues/1572. Should be fixed with 1.16.22 version.

Gradle plugin compatibility - how to find out?

Can Gradle plugins for 1.11+ be expected to work for 2.+, and if not, how can one find out the state of compatibility?
Specifically, I have had success using Gradle 1.11 in a project spring-boot project. When upgrading to Gradle 2.2, I noticed that the spring-boot plugin does not seem to be available, although I haven't found any references to a particular Gradle version in the Spring Boot Gradle documentation (http://docs.spring.io/autorepo/docs/spring-boot/1.2.0.BUILD-SNAPSHOT/reference/html/build-tool-plugins-gradle-plugin.html).
Using Gradle 2.2, I get:
* What went wrong:
A problem occurred evaluating root project 'NN'.
> Failed to apply plugin [id 'spring-boot']
> A problem occurred configuring project ':webapp'.
> Extension of type 'SpringBootPluginExtension' does not exist. Currently registered extension types: [DefaultExtraPropertiesExtension, DefaultArtifactPub
licationSet_Decorated, ReportingExtension_Decorated, DefaultProjectSourceSet_Decorated, DefaultBinaryContainer_Decorated]
It depends on the particular plugin, and would ideally be tested/documented there. 1.x to 2.x was a big jump in terms of the Groovy version used by Gradle, which can cause compatibility issues for plugins implemented in Groovy. Also, 1.x plugins using deprecated or internal APIs may not work in 2.x.

Resources