Skip to content

Use resolved versions instead of resolutionStrategy.failOnVersionConflict #5528

@ejona86

Description

@ejona86

Gradle 5.2 added support for publishing the resolved versions of dependencies used.

We are currently using failOnVersionConflict because we didn't have a way to check that Maven would resolve dependencies correctly. Although failOnVersionConflict is similar to Maven Enforcer's dependencyConvergence, we only care about supporting requireUpperBoundDeps.

Unfortunately, resolved versions seems to be sufficient only for direct dependencies. A transitive dependency included twice could have the lesser of the two versions first (and so Maven would chose the wrong one). That may not happen very often, so we could potentially rely on things like https://storage.googleapis.com/cloud-opensource-java-dashboard/dashboard/target/dashboard/dashboard.html to notice failures. failOnVersionConflict is a PITA and error-prone, so even suboptimal tradeoffs may be welcome.

Using resolved versions is also of interest to #4680.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions