You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the plugin declares component metadata rules in the project, making it impossible to declare other rules in the settings.
I think the plugin should be split to have the component metadata rules in a settings plugin (actually, a plugin that could be applied either to a project or the settings, so projets that prefer project-level component metadata rules or have other plugins doing the same –or just because they want to leverage version catalogs and that cannot be done for settings plugins 🐔🥚– can continue using them).
Or maybe the plugin could detect if it's also been applied to the settings (not sure if it's possible though) so it can conditionally add the rules to the project?
Or maybe the plugin could detect when it's applied to the settings and automatically inject the capabilities resolution rules into all projects, so it could be applied to either (but not both), and wouldn't need to be split?
Or just make it applicable to either settings (without registering the capabilities resolution rules) and projects, and declare component metadata rules in both cases? but that would make it incompatible with rulesMode FAIL_ON_PROJECT_RULES, and would warn for any other rulesMode.
The text was updated successfully, but these errors were encountered:
Related note: If the rules are universal they should also apply for the dependencies of Gradle plugins. Or the dependencies users use in their own build logic.
Hence, the rules should also be applied to the plugin classpath:
buildscript {
dependencies.components {
...
}
}
This is only possible when this plugin is applied as a settings plugin.
In 1.0 it will be possible to apply the plugin in settings. The limitation will be that this only registers the rules but not the default resolution strategies, as these need to be explicitly defined on each configuration. But you can then resolve conflicts via resolutionStrategy.capabilitiesResolution { ... } in the places where needed.
Similar to ljacomet/logging-capabilities#18 (which I merely copy/pasted here)
Currently, the plugin declares component metadata rules in the project, making it impossible to declare other rules in the settings.
I think the plugin should be split to have the component metadata rules in a settings plugin (actually, a plugin that could be applied either to a project or the settings, so projets that prefer project-level component metadata rules or have other plugins doing the same –or just because they want to leverage version catalogs and that cannot be done for settings plugins 🐔🥚– can continue using them).
Or maybe the plugin could detect if it's also been applied to the settings (not sure if it's possible though) so it can conditionally add the rules to the project?
Or maybe the plugin could detect when it's applied to the settings and automatically inject the capabilities resolution rules into all projects, so it could be applied to either (but not both), and wouldn't need to be split?
Or just make it applicable to either settings (without registering the capabilities resolution rules) and projects, and declare component metadata rules in both cases? but that would make it incompatible with rulesMode
FAIL_ON_PROJECT_RULES
, and would warn for any other rulesMode.The text was updated successfully, but these errors were encountered: