# Interface ExternalDependency

All Superinterfaces:
  `Dependency, HasAttributes, HasConfigurableAttributes<ModuleDependency>, ModuleDependency, ModuleVersionSelector`

All Known Subinterfaces:
  `ExternalModuleDependency, MinimalExternalModuleDependency`

public interface ExternalDependency extends ModuleDependency, ModuleVersionSelector

An `ExternalDependency` is a `Dependency` on a source outside the current project hierarchy.

Since:
  0.7

- ## Field Summary

  ### Fields inherited from interface Dependency

  `ARCHIVES_CONFIGURATION, CLASSIFIER, DEFAULT_CONFIGURATION`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `ExternalDependency`
  `copy()`
  Creates and returns a new dependency with the property values of this one.
  `VersionConstraint`
  `getVersionConstraint()`
  Returns the version constraint to be used during selection.
  `boolean`
  `isForce()`
  Returns whether or not the version of this dependency should be enforced in the case of version conflicts.
  `void`
  `version(Action<? super MutableVersionConstraint> configureAction)`
  Configures the version constraint for this dependency.

  ### Methods inherited from interface Dependency

  `because, getGroup, getName, getReason, getVersion`

  ### Methods inherited from interface ModuleDependency

  `addArtifact, artifact, artifact, attributes, capabilities, doNotEndorseStrictVersions, endorseStrictVersions, exclude, getArtifacts, getAttributes, getCapabilitySelectors, getExcludeRules, getRequestedCapabilities, getTargetConfiguration, isEndorsingStrictVersions, isTransitive, setTargetConfiguration, setTransitive`

  ### Methods inherited from interface ModuleVersionSelector

  `getGroup, getModule, getName, getVersion, matchesStrictly`

- ## Method Details

  - ### isForce

    boolean isForce()
    Returns whether or not the version of this dependency should be enforced in the case of version conflicts.
    Since:
      0.7

  - ### copy

    ExternalDependency copy()
    Creates and returns a new dependency with the property values of this one.
    Specified by:
      `copy` in interface `Dependency`
    Specified by:
      `copy` in interface `ModuleDependency`
    Returns:
      The copy. Never returns null.

  - ### version

    void version(Action<? super MutableVersionConstraint> configureAction)
    Configures the version constraint for this dependency.
    Parameters:
      `configureAction` - the configuration action for the module version
    Since:
      4.4

  - ### getVersionConstraint

    VersionConstraint getVersionConstraint()
    Returns the version constraint to be used during selection.
    Returns:
      the version constraint
    Since:
      4.10