gradle-pre-commit-git-hooks
gradle-pre-commit-git-hooks copied to clipboard
feat: allow to instantiate extension w/o settings
allowing to pass the path to the extension enable usage even after the settings have been evaluated
Changes
I added another constructor to allow using the GitHooksExtension without Settings object.
Context
My problem is that I cannot use your plugin withing the settings.gradle.kts. My setup is complex and I basically can only have plugins in my build.gradle.kts. With this change I am able to figure out the path myself and create my instance of the GitHooksExtension myself and pass the path.
That means: When it is not absolutely required that the plugin is applied to the settings.gradle.kts this would even be preferable.
Documentation (please check one with an [x])
- [ ] I have updated the README.md file, or
- [x] No documentation update is required
How I've tested my work (please tick one)
I have verified these changes via:
- [x] Code inspection only, or
- [ ] No unit tests but ran on a real Gradle project, or
- [ ] Newly added/modified unit tests