Hi all, I am working on a bugfix in the Hibernate ...
# plugin-development
c
Hi all, I am working on a bugfix in the Hibernate Gradle Plugin. Currently, it only works if the order of plugins in the
build.gradle
file is correct. The Java Plugin (or another plugin that pulls in the Java plugin) needs to be in the plugin list before the Hibernate plugin. During review of my PR on Github, @Steve Ebersole brought up the question if I was using the correct approach while fixing the bug. It would be nice if someone could have a quick look at the pull request and either comment here (or in the PR) if the chosen approach is the right one and if not, provide a hint how it should be done. Thank you in advance! https://github.com/hibernate/hibernate-orm/pull/8770
v
Without having had a look yet, if it requires a certain plugin application order, then it is not the right thing to do / right path followed. 🙂
And a first look at the PR shows that you use
project.getPlugins()
which you shouldn't use (have a look at the JavaDoc.
project.getPluginManager().withPlugin("java", javaPlugin -> { ... })
is the right way to react to a plugin being applied