I was recently working with Java 11 and Lombok on Intellij and it was all fine.
I tried Java 12 but now I'm always getting compilation errors, because lombok 's annotations seem to be ignored.
Does anyone know if lombok supports java 12 ?
- Intellij : 2019 1.1
- Lombok : 1.18.6
- Lombok plugin : v0.24
- JDK : 12.0.1
Yes it should work. Lombok supports Java 12 since Early Access version of Java 12.
https://github.com/rzwitserloot/lombok/issues/1888
Use the latest available versions of Lombok library (1.18.6+), Lombok IDE plugin (0.24+) and IntelliJ IDEA itself (2019.1+). Don't forget to 'Enable Annotation Processing' within IntelliJ's settings.
Just tested:
build.gradle
plugins {
id 'java-library'
}
repositories {
mavenCentral()
}
dependencies {
compileOnly 'org.projectlombok:lombok:1.18.6'
annotationProcessor 'org.projectlombok:lombok:1.18.6'
}
Application.java
public class Application {
public static void main(String[] args) {
Dto dto = new Dto();
dto.setParam("Hello World!");
System.out.println(dto.getParam());
}
}
Dto.java
import lombok.Data;
@Data
public class Dto {
private String param;
}
Output
"C:\Program Files\Java\jdk-12\bin\java.exe" ... Application
Hello World!
Process finished with exit code 0
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With