Lombok supported in studio?

Is lombok supported?

I tried creatina a simple entity, with @getters and @setters annotation.

The app was compiled, screens generated, etc., but at runtime I’ve got a “missing getter” error.
Adding manually getters and setters in the code solved the problem, so it seems that lombok was ignored.

We don’t test Jmix with Lombok, so we don’t recommend using it in Jmix projects.


I think cuba gradle plugin enhanced entity class before lombok add getter to it, so you get this error. Maybe you can control the order

Add the following dependency into your build.gradle

compileOnly 'org.projectlombok:lombok:1.18.22’
annotationProcessor 'org.projectlombok:lombok:1.18.22’
testCompileOnly 'org.projectlombok:lombok:1.18.22’
testAnnotationProcessor 'org.projectlombok:lombok:1.18.22’

I have already used lombok’s @Data on entity like below which saves me many getter and setter code!

@Table(name = “T_APP_Enable”)
public class TAppEnable {
@Column(name = “IDENTIFIER”, nullable = false, length = 100)
private String identifier;
@Column(name = “NAME”, length = 100)
private String name;

Jmix team doesn’t recommend using @Data with any JPA entities, even outside of Jmix.
For reasons described in this article: Lombok and JPA: What may go wrong?



Just as a side note: for all non JPA entity classes in a Jmix project it is perfectly possible to use Lombok. So any kind of POJO either for data transfer or for internal abstractions within business logic is not affected by this limitation.


Thanks to everybody. I found the automatic creation of getters/setters in IDEA a handy replacement