Jmix entity enhancer tasks fail with Gradle Configuration Cache

@tom.monnier We noticed something appearing similar - I’m not sure if it is. https://forum.jmix.io/t/sometimes-entitymanager-has-problem-compiling-any-query-for-any-entity/4218/3

See also: https://github.com/jmix-framework/jmix/issues/3102