gradle-nbm-plugin
gradle-nbm-plugin copied to clipboard
Upgrade to Gradle 7.3, setup CI, fix tests, re-format code
I've spent some time getting this plugin to work with newer versions of Gradle and want to share some patches that I think might be useful in the main repository. The main goals for this pull request were to update everything to work with new versions of Gradle, fix the plugin, fix the build of the project, restore tests and prepare the environment for future changes while not adding new features and trying not to introduce any new regressions.
It is based on the following pull-request and project forks: Pull-request #37 ZNixian/gradle-nbm-plugin fvogler/gradle-nbm-plugin
Changes
-
Updates Gradle to version 9.3.3 See original pull request https://github.com/radimk/gradle-nbm-plugin/pull/37.
-
Re-formats all the code and adds tools for code style validation The lack of a unified code style led to many of the changes in the other forks involving code formatting (for example, https://github.com/fvogler/gradle-nbm-plugin/commit/8b9b1fce56fae7dc2459eb0b02cef2f9b9adcedd https://github.com/ZNixian/gradle-nbm-plugin/commit/1b27b557c313adcff0df0613dd562726f0336f03 https://github.com/ZNixian/gradle-nbm-plugin/commit/70a3a9272738a84378147f3c56195157d4ef1432). This makes it difficult to merge code from different authors due to large number of merge conflicts. Adding automated code style validation should improve maintainability. I chose Spotless as the main code style checker. It is configured to use Eclipse Code Formatter for Java code. CodeNarc was also added for the validation of Groovy code because it gives better results than the Eclipse Code Formatter from Spotless.
-
Adds build on Github Actions This will simplify control of project build and test execution. Publishing on Github Packages has been configured to allow users to download and test intermediate builds, but it can be removed if not required.
-
Fixes tests @ZNixian has done a lot of work to get the integration tests working with the new versions of the dependencies. I also added some patches from @fvogler and moved all tests to JUnit 5. I also needed to add a patch from @ZNixian with the rewritten mergeProperties task, since the tests would fail without it.
Besides this, gradle-git plugin has been replaced by the nebula-release-plugin as the former is no longer maintained and its dependency org.eclipse.jgit conflicts with the newer version required by Spotless.
I know that this project is no longer developed and do not expect this pull request to be merged. Just leave it here in case someone will find it helpful.
Thanks for sharing this. It is as you wrote: I am not going to merge and publish this but your contribution is appreciated and hopefully someone will benefit from it. And let me repeat that it would be great to find a new owner for this plugin. I will happily update this project to point folks in a new direction.