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

Allow a custom naming strategy #87

Open
yschimke opened this issue Jan 12, 2024 · 4 comments
Open

Allow a custom naming strategy #87

yschimke opened this issue Jan 12, 2024 · 4 comments
Labels

Comments

@yschimke
Copy link

Repeating from pemistahl/version-catalog-linter-gradle-plugin#2

it would be good to have a way to set a standard naming strategy, by default maybe the names used by Android Studio when you follow the hint to add a new TOML dependency.

And rename in both the TOML and build files.

--- apacheHttpClient = { group = "org.apache.httpcomponents", name = "httpclient", version = "4.5.14" }
+++ httpcomponents-httpclient = { group = "org.apache.httpcomponents", name = "httpclient", version = "4.5.14" }
@autonomousapps
Copy link
Collaborator

Thanks for the issue. How does this impact sorting dependencies?

@yschimke
Copy link
Author

I'm trying to lazyweb my way to a feature I want :)

Maybe more appropriate for https://github.com/autonomousapps/dependency-analysis-gradle-plugin

But generally sorting when the TOML entries are a mix of

  • copy and pasted from existing proejcts
  • manually typed
  • Android Studio autocompleted

Is going to continue to be a mess, with androidx libraries in random places. This feature would be a power sort :)

Feel free to close as out of scope.

@autonomousapps
Copy link
Collaborator

Are you saying basically, not just sort the names as they currently exist, but change the names and also simultaneously update the version catalog to match those new names (also sorting the catalog, I imagine), as part of a new "power sort" feature?

If so, I recently did something like that for work, and it's very non-trivial :D

It's not really part of DAGP either, but more like the role of an orchestrator (convention plugin in the above case) that runs DAGP, this sorter, and then other customizations to achieve a well-defined final goal.

@autonomousapps autonomousapps added the enhancement New feature or request label Oct 11, 2024
@yschimke
Copy link
Author

Yep, exactly that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants