Overview | Package | Class | Deprecated | Index | Help
| Groovy Documentation
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | METHOD | DETAIL: FIELD | METHOD

## org.gradle.api.artifacts
[Java] Interface Dependency

    public interface Dependency

A `Dependency` represents a dependency on the artifacts from a particular source. A source can be an Ivy module, a Maven pom, another Gradle project, a collection of Files, etc... A source can have zero or more artifacts.

Authors:
  Hans Dockter

Field Summary
`java.lang.String` | `ARCHIVES_CONFIGURATION`
`java.lang.String` | `CLASSIFIER`
`java.lang.String` | `DEFAULT_CONFIGURATION`

Method Summary
`boolean` | `contentEquals(Dependency dependency)` Returns whether two dependencies have identical values for their properties.
`Dependency` | `copy()` Creates and returns a new dependency with the property values of this one.
`java.lang.String` | `getGroup()` Returns the group of this dependency.
`java.lang.String` | `getName()` Returns the name of this dependency.
`java.lang.String` | `getVersion()` Returns the version of this dependency.

Field Detail

### ARCHIVES_CONFIGURATION

    public java.lang.String ARCHIVES_CONFIGURATION

### CLASSIFIER

    public java.lang.String CLASSIFIER

### DEFAULT_CONFIGURATION

    public java.lang.String DEFAULT_CONFIGURATION

Method Detail

### contentEquals

    public boolean contentEquals(Dependency dependency)

  Returns whether two dependencies have identical values for their properties. A dependency is an entity with a key. Therefore dependencies might be equal and yet have different properties.
  Parameters:
    `dependency` - The dependency to compare this dependency with

### copy

    public Dependency copy()

  Creates and returns a new dependency with the property values of this one.
  Returns:
    The copy. Never returns null.

### getGroup

    public java.lang.String getGroup()

  Returns the group of this dependency. The group is often required to find the artifacts of a dependency in a repository. For example, the group name corresponds to a directory name in a Maven like repository. Might return null.

### getName

    public java.lang.String getName()

  Returns the name of this dependency. The name is almost always required to find the artifacts of a dependency in a repository. Never returns null.

### getVersion

    public java.lang.String getVersion()

  Returns the version of this dependency. The version is often required to find the artifacts of a dependency in a repository. For example the version name corresponds to a directory name in a Maven like repository. Might return null.

Groovy Documentation