First create simple entities to be enhanced.
If we try to enhance it with hibernate-gradle-plugin version 5.2.1.Final with following configuration as suggested by official documentation.
We fail with an exception
However the problem cannot be reproduced using version 5.2.0.Final or 5.1.0.Final
The complete runnable project is attached.
gradle 2.14, hibernate (versions above). database irrelevant.