-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support for Bill Of Materials #59
Comments
@afloarea Thanks for bringing this up. There is some limited support for BOM in bld, but not to extend you are describing. How would your example really differ from: bom = version(4, 5, 12);
scope(compile)
.include(dependency("io.vertx", "vertx-core", bom))
.include(dependency("com.fasterxml.jackson.core", "jackson-databind")); Gradle also introduces the concept of platform: dependencies {
implementation(platform("org.jetbrains.kotlin:kotlin-bom"))
implementation("org.jetbrains.kotlin:kotlin-stdlib")
} Which ensures that all Kotlin dependencies in your project use the same version specified in the BOM. |
@ethauvin Thank you for the quick reply and thank you in advance for your patience with this (too long) post. First, please let me try to highlight the difference. In the maven example (with the
Moving to bld: var bom = version(4, 5, 12);
scope(compile)
.include(dependency("io.vertx", "vertx-core", bom)); and run var bom = version(4, 5, 12);
scope(compile)
.include(dependency("io.vertx", "vertx-core", bom))
.include(dependency("com.fasterxml.jackson.core", "jackson-databind")); and run
So, no version in the output for When I created the ticket, I was thinking of having a way to explicitly configure (in some form or another) that the dependencies should have the version declared in a BOM, rather than have the build system guess what the user wants/needs. As such, I made up the Having a
Maybe the Maybe passing the I am not a build tool or dependency management specialist, so I may be very wrong with all of this. If something I mentioned doesn't make sense or is flat out wrong, please let me know. Thanks again for your patience. |
@gbevin What do you think of the proposed syntax? It does deal with all the case scenarios I can think of, but I'm not sure how that would integrate with bld's internals. |
Thanks for the suggestion @afloarea, I'm thinking about what the best way would be to support this. |
Summary
Maven supports the idea of a Bill of Materials (BOMs) that hold versions for dependencies.
For example:
Then dependencies can be declared without version:
This allows for upgrading the dependencies in the BOM all at once with a single version change of the BOM.
Proposal
Add support for BOMs in bld
For example:
Of course, this is just an example, maybe there is better syntax for this or maybe there is a better approach altogether. Please let me know what you think.
The text was updated successfully, but these errors were encountered: