Closed Mazorius closed 3 years ago
@Mazorius thanks for the suggestion, it would not be hard to make them public but do you see any use case of this public constants for our plugin users ?
If you write a custom plugin which applies your plugin or you want to extend or reconfigure the your created tasks.
I think currently a developer needs to hope you will not change the names in the future as they declare this names as strings instead of using your well defined constants.
For example I used the SonarQube plugin in my projects an need to say ... with the sonarqube
plugin do this.
Much better would it to use a constant so SonarQube can change their plugin name and I do not care as developer. Because I am using the constant which they will change ;-)
Thanks @Mazorius , done in https://github.com/klaxit/hidden-secrets-gradle-plugin/pull/20 to be able to use them in tests, if you can check the code please ;)
Looks good ;-)
Maybe you will check the constants content in tests so that changing them will result in test failures?
@Mazorius I agree with you, done in https://github.com/klaxit/hidden-secrets-gradle-plugin/pull/20
So I close this issue ;)
Thanks
I think it would be nice to make the constants here public. This would enable everyone to us this in their code instead of creating duplicated strings.
For example: