Skip to content

Publish a BOM #508

@mikeholler

Description

@mikeholler

Hey there! Love the project, but I would love it if there was a BOM file that is published for each version. If you're not familiar with a BOM,it stands for "Bill of Materials" it helps your Gradle (in my case, but it's originally a Maven thing) file look like this:

implementation("io.prometheus:simpleclient-bom:0.6.0")
implementation("io.prometheus:simpleclient_common")
implementation("io.prometheus:simpleclient_dropwizard")
implementation("io.prometheus:simpleclient_servlet")

Instead of this:

val prometheusVersion by extra { "0.6.0" }

implementation("io.prometheus:simpleclient:$prometheusVersion")
implementation("io.prometheus:simpleclient_common:$prometheusVersion")
implementation("io.prometheus:simpleclient_dropwizard:$prometheusVersion")
implementation("io.prometheus:simpleclient_servlet:$prometheusVersion")

Notice how you just leave the versions off when you use a BOM. This can help reduce the number of dependency compatibility surprises one can encounter, especially if a transitive dependency brings in a newer version of one of the components (it'll be reduced to the BOM's version).

Here's a deeper dive into how a BOM works:

https://howtodoinjava.com/maven/maven-bom-bill-of-materials-dependency/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions