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

Externalize the Dependency Notations API #435

Open
LouisCAD opened this issue Sep 9, 2021 · 1 comment
Open

Externalize the Dependency Notations API #435

LouisCAD opened this issue Sep 9, 2021 · 1 comment
Assignees

Comments

@LouisCAD
Copy link
Member

LouisCAD commented Sep 9, 2021

The problem

Adding custom dependency notations that provide the same user experience as the ones bundled in refreshVersions is not straightforward and requires to setup a Gradle plugin, and makes upgrading refreshVersions harder as you need to update your plugin first.

What we want

We want to make it as easy as possible for folks to make their own dependency notations that integrate nicely with refreshVersions. Big set of libraries could publish their catalog (yes, it would compete with Gradle's incubating version catalog), and companies could make their own, be it for internal, or public libraries.

One way we can do it: externalizing the API

Externalizing the Dependency Notations API to its minimum would allow folks to start a Kotlin/JVM library, depend on it, and provide their own objects.

refreshVersions-core itself would depend on this library, and refreshVersions (with its bundled dependency notations) would use that API just like any other "dependency catalog".

Challenges

We need to figure out:

  1. How to ensure custom dependency catalogs can be available in the build script (incl. the one of buildSrc) with minimal configuration
  2. Ensure that it works for Groovy DSL in the IDE with no extra double-config needed per catalog
  3. Ensure the version key rules can be picked up at the right time by refreshVersions core
  4. Make it easy to test a custom catalog is as correct as can be tested reasonably, and try to enforce testing it as much as possible

Something that could be extra nice is allowing to extend the default/bundled catalog (with warnings since they can be shadowed by refreshVersions updates). That way, folks can add that latest library with the same syntax while we're on vacation or busy.

@LouisCAD LouisCAD self-assigned this Jan 9, 2022
@jmfayard
Copy link
Member

I don't think this use case is important right now.
If lots of people were asking to create their own plugins on top of refreshVersions-dependencies we should do that. I don't see that happening on the other hand.

Probably people will want to either contribute to refreshVersions or generate a versions catalog.

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