Package org.gradle.api.artifacts

## Interface DirectDependencyMetadata

- All Superinterfaces:
    `DependencyMetadata<DirectDependencyMetadata>`

      public interface DirectDependencyMetadata
      extends DependencyMetadata<DirectDependencyMetadata>

  Describes a dependency declared in a resolved component's metadata, which typically originates from a component descriptor (Gradle metadata file, Ivy file, Maven POM). This interface can be used to adjust a dependency's properties via metadata rules (see `ComponentMetadataHandler`.
  Since:
    4.5

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `void` | `doNotEndorseStrictVersions()` | Resets the `isEndorsingStrictVersions()` state of this dependency.
    `void` | `endorseStrictVersions()` | Endorse version constraints with `VersionConstraint.getStrictVersion()` strict versions} from the target module.
    `boolean` | `isEndorsingStrictVersions()` | Are the `VersionConstraint.getStrictVersion()` strict version} dependency constraints of the target module endorsed?

    - ### Methods inherited from interface org.gradle.api.artifacts.DependencyMetadata

      `attributes, because, getAttributes, getGroup, getModule, getName, getReason, getVersionConstraint, version`

- - ### Method Detail

    - #### endorseStrictVersions

          @Incubating
          void endorseStrictVersions()

      Endorse version constraints with `VersionConstraint.getStrictVersion()` strict versions} from the target module. Endorsing strict versions of another module/platform means that all strict versions will be interpreted during dependency resolution as if they where defined by the endorsing module itself.
      Since:
        6.0

    - #### doNotEndorseStrictVersions

          @Incubating
          void doNotEndorseStrictVersions()

      Resets the `isEndorsingStrictVersions()` state of this dependency.
      Since:
        6.0

    - #### isEndorsingStrictVersions

          @Incubating
          boolean isEndorsingStrictVersions()

      Are the `VersionConstraint.getStrictVersion()` strict version} dependency constraints of the target module endorsed?
      Since:
        6.0