-
-
Notifications
You must be signed in to change notification settings - Fork 374
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
Provide support for gradle style version catalogs #4483
Comments
I think, why not? Personally, I find managing versions in Scala directly easier, but if that helps with adoption by users and eases tooling, we might as well support it. I haven't used any TOML library in Scala, so I leave that question open for now. The code generation seems to be a regular code generator which contributes to I assume, these catalogs are for the whole project, not per-module. Is that right? |
Yeah I see them for the whole project. |
I think this should come as contrib plugin for a start. That way, it can be used in various ways including in meta-builds, which is your intended case. The additional dependencies should be loaded via an worker or isolated classloader, so they don't bloat or collide with the core build. Ideally, you can find an existing library that already does the harder parts and just need to plug-in the part, that writes the Mill-specific code. |
For clarification, when you say contrib plugin, you mean external outside the mill codebase? |
I meant the |
In gradle, users are able to manage versions using version catalogs.
In the typical scenario, a user defines their version catalog as a TOML file under the gradle folder in their project.
The TOML file follows the following format:
Here is a simpler example showing all sections:
Typesafe Access
What is a convenient outcome of this, is that gradle generates type safe accessors for the libraries, so the
ktor-client-core
lib above could be referenced like:Or perhaps adding a full bundle with:
Convenient And Familiar
As Mill is making a push to be a respected polyglot build tool, I think quality of life tools are both familiar to folks coming from other tools like gradle and cargo, and also show a level of polish that users appreciate.
Open Questions
The text was updated successfully, but these errors were encountered: