This does come from the work for https://hibernate.atlassian.net/browse/HHH-15314. The problem centers on being able to understand the task that compiles the sources to be able to apply a task dependency so that the enhancement runs whenever the compilation runs. Originally, the plugin implicitly dealt directly with the main SourceSet and Gradle provides easy mapping from SourceSet and task names for Java SourceSets. Most likely the fix would involve leveraging SourceSet#getTaskName[1] or SourceSet#getCompileTaskName[2]. I am not familiar enough in anger with either of those to say for sure atm [1] https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/SourceSet.html#getTaskName-java.lang.String-java.lang.String- [2] https://docs.gradle.org/current/javadoc/org/gradle/api/tasks/SourceSet.html#getCompileTaskName-java.lang.String- |