-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make constants for task names public for use in other Gradle plugins #83
Comments
|
Thanks for the report! I'll plan to include this in 0.8. |
This allows other plugins to more safely reference the task names. This fixes #83.
I have constants for the task names, so I'll make them public. As for the plugin ID, I'd suggest referencing the plugin class instead. (i.e. |
The ID is useful for https://docs.gradle.org/current/dsl/org.gradle.api.plugins.PluginManager.html |
You should be able to get the same functionality from: project.getPlugins().withType(ReckonPlugin) {
// logic here
} Personally, I just hardcode the strings in a |
Yes, although documentation says, it is recommend to use
True, in my case I have a plugin that applies reckon automatically and then configures it. So I have that dependency anyways. Using constants just feels a bit more natural then. |
If you're already directly applying the plugin, you won't get any reactivity out of Since plugin IDs are specified external to the code, in a properties file, a constant wouldn't ensure it matches the actual ID. I don't recall seeing constants used for plugin IDs in any other plugins I've read through. |
When writing Gradle plugins that try to pre-configure something, it is useful to have public constants for task names available.
The text was updated successfully, but these errors were encountered: