Skip to content
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 plugin compatible with component metadata rules declared in settings.gradle #18

Open
tbroyer opened this issue Mar 9, 2022 · 2 comments
Milestone

Comments

@tbroyer
Copy link
Contributor

tbroyer commented Mar 9, 2022

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 alignment 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 extension 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 extension) and projects, and declare component rules in both cases? but that would make it incompatible with rulesMode FAIL_ON_PROJECT_RULES, and would warn for any other rulesMode.

@ljacomet
Copy link
Owner

ljacomet commented May 4, 2022

Thanks for that report and it is a good point. I'll have to think a bit about the best approach for this one.

@tbroyer
Copy link
Contributor Author

tbroyer commented May 14, 2022

@ljacomet ljacomet added this to the 0.12.0 milestone Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants