I’ve been programming in Java SE using JPA for more than six years and I can assure you that, before using Gradle, I have never had the need to explicitly specify the entity classes that reside in the same jar where persistence.xml reside for my application to work. And I don’t even have to list them if I’m running in Java EE. Sometimes I only have to list the classes if they are located in another jar, which is not the case here.
It would be very sad from the JPA specification if I had to declare all my classes in the deployment descriptor that lives in the same jar.
Again, before using Gradle (at least for testing), I didn’t need to declared the mapped classes in persistence.xml for the application to work. They were discovered automatically.