Package org.openrewrite.gradle.marker
Class GradleDependencyConstraint
java.lang.Object
org.openrewrite.gradle.marker.GradleDependencyConstraint
- All Implemented Interfaces:
Serializable
Models a dependency constraint in Gradle. These are typically used to manage the versions of transitive dependencies.
For example:
dependencies {
constraints {
implementation("com.fasterxml.jackson.core:jackson-core:2.17.2")
}
}
Compare to Gradle's internal org.gradle.api.internal.artifacts.dependencies.DefaultDependencyConstraint
See: rich version constraints.- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAttempt to boil down the several version numbers/patterns into a single version number.
-
Constructor Details
-
GradleDependencyConstraint
public GradleDependencyConstraint()
-
-
Method Details
-
approximateEffectiveVersion
Attempt to boil down the several version numbers/patterns into a single version number. Potentially lossy as the exact version selection process requires a list of available versions. But in situations where you know that complex selectors are not involved it's convenient to grab the highest-precedence number available.
-