Class ConsistentVersionsPlugin.GcvAttributes
java.lang.Object
com.palantir.gradle.versions.ConsistentVersionsPlugin.GcvAttributes
- Enclosing class:
ConsistentVersionsPlugin
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionWhilst calculating theunifiedClasspathfor a parent build, we don't want internal configurations from child builds - i.e.final voidconfigureGcvBaseAttributes(org.gradle.api.attributes.AttributeContainer attributes) final voidconfigureGcvSourceAttributes(org.gradle.api.attributes.AttributeContainer attributes) protected abstract org.gradle.api.invocation.Gradleprotected abstract org.gradle.api.model.ObjectFactoryfinal org.gradle.api.attributes.UsageWe don't want the consumable configurations we create to have any known usage, so we give them this usage.
-
Constructor Details
-
GcvAttributes
public GcvAttributes()
-
-
Method Details
-
getGradle
@Inject protected abstract org.gradle.api.invocation.Gradle getGradle() -
getObjects
@Inject protected abstract org.gradle.api.model.ObjectFactory getObjects() -
gradleUsageForGcv
public final org.gradle.api.attributes.Usage gradleUsageForGcv()We don't want the consumable configurations we create to have any known usage, so we give them this usage. This is so that:- they don't cause an ambiguity between the copied and the original
apiElements,runtimeElementsetc., when a resolution with a required usage is performed (such as by resolving acompileClasspathorruntimeClasspathconfiguration) - to avoid the configurations we create to calculate locks being resolved as an actual candidate in normal resolution, when all other candidates didn't match, simply because it had completely distinct attributes from the requested attributes.
- they don't cause an ambiguity between the copied and the original
-
buildPath
Whilst calculating theunifiedClasspathfor a parent build, we don't want internal configurations from child builds - i.e. included builds - to be selected. We effectively want to consume the "published" variant i.e. if the included build were to be an external library we were to consume, what dependencies and jars do we get? -
configureGcvBaseAttributes
public final void configureGcvBaseAttributes(org.gradle.api.attributes.AttributeContainer attributes) -
configureGcvSourceAttributes
public final void configureGcvSourceAttributes(org.gradle.api.attributes.AttributeContainer attributes)
-