Jpamodelgen with Kotlin and Gradle error

Hello everyone, I’m trying to use generated metamodel classes in Hibernate with Kotlin and Gradle. I want to use generated classes to annotate my OneToMany entities. When doing so I get error:

error: element value must be a constant expression @jakarta.persistence.OneToMany(mappedBy = null)

I am able to use generated models in runtime like for a variable, but when using for annotiation iI get this error.

I understand it may be kapt + Hibernate config, so probably this is not Bug. I am maybe looking for someone who is using similar stack and maybe found some solution.

I found by accident that friend of mine is having a similar issue while using maven instead of gradle: spring boot - How to generate static hibernate models from kotlin class entity? - Stack Overflow

Reproducer for reference

Thanks for help.