# JvmComponentDependencies

API Documentation: | `JvmComponentDependencies`

Note: This class is incubating and may change in a future version of Gradle.

This DSL element is used to add dependencies to a component, for instance a `TestSuite`

- `implementation` dependencies are used at compilation and runtime.
- `compileOnly` dependencies are used only at compilation and are not available at runtime.
- `runtimeOnly` dependencies are not available at compilation and are used only at runtime.
- `annotationProcessor` dependencies are used only at compilation for the annotation processor classpath

### Properties

Property | Description
`annotationProcessor` | Incubating Returns a `DependencyAdder` to add to the set of annotation processor dependencies.
`compileOnly` | Incubating Returns a `DependencyAdder` to add to the set of compile-only dependencies.
`enforcedPlatform` | Incubating A dependency modifier that can modify a dependency to select an enforced platform variant.
`implementation` | Incubating Returns a `DependencyAdder` to add to the set of implementation dependencies.
`platform` | Incubating A dependency modifier that can modify a dependency to select a platform variant.
`runtimeOnly` | Incubating Returns a `DependencyAdder` to add to the set of runtime-only dependencies.
`testFixtures` | Incubating A dependency modifier that can modify a dependency to select a test fixtures variant.

### Methods

Method | Description
`gradleApi()` | Incubating Creates a dependency on the API of the current version of Gradle.
`gradleTestKit()` | Incubating Creates a dependency on the Gradle test-kit API.
`localGroovy()` | Incubating Creates a dependency on the version of Groovy that is distributed with the current version of Gradle.
`module(dependencyNotation)` | Incubating Create an `ExternalModuleDependency` from the given notation.
`module(group, name, version)` | Incubating Create an `ExternalModuleDependency` from a series of strings.
`project()` | Incubating Returns the current project as a `ProjectDependency`.
`project(projectPath)` | Incubating Converts an absolute or relative path to a project into a `ProjectDependency`. Project paths are separated by colons. This method fails if the project cannot be found.

### Script blocks

No script blocks

### Property details

#### `DependencyAdder` `annotationProcessor` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

Returns a `DependencyAdder` to add to the set of annotation processor dependencies.

`annotationProcessor` dependencies are used only at compilation, and are added to the annotation processor classpath.

#### `DependencyAdder` `compileOnly` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

Returns a `DependencyAdder` to add to the set of compile-only dependencies.

`compileOnly` dependencies are used only at compilation and are not available at runtime.

#### `EnforcedPlatformDependencyModifier` `enforcedPlatform` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

A dependency modifier that can modify a dependency to select an enforced platform variant.

#### `DependencyAdder` `implementation` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

Returns a `DependencyAdder` to add to the set of implementation dependencies.

`implementation` dependencies are used at compilation and runtime.

#### `PlatformDependencyModifier` `platform` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

A dependency modifier that can modify a dependency to select a platform variant.

#### `DependencyAdder` `runtimeOnly` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

Returns a `DependencyAdder` to add to the set of runtime-only dependencies.

`runtimeOnly` dependencies are not available at compilation and are used only at runtime.

#### `TestFixturesDependencyModifier` `testFixtures` (read-only)

Note: This property is incubating and may change in a future version of Gradle.

A dependency modifier that can modify a dependency to select a test fixtures variant.

### Method details

#### `Dependency` `gradleApi`()

Note: This method is incubating and may change in a future version of Gradle.

Creates a dependency on the API of the current version of Gradle.

#### `Dependency` `gradleTestKit`()

Note: This method is incubating and may change in a future version of Gradle.

Creates a dependency on the Gradle test-kit API.

#### `Dependency` `localGroovy`()

Note: This method is incubating and may change in a future version of Gradle.

Creates a dependency on the version of Groovy that is distributed with the current version of Gradle.

#### `ExternalModuleDependency` `module`(`CharSequence` dependencyNotation)

Note: This method is incubating and may change in a future version of Gradle.

Create an `ExternalModuleDependency` from the given notation.

#### `ExternalModuleDependency` `module`(`String` group, `String` name, `String` version)

Note: This method is incubating and may change in a future version of Gradle.

Create an `ExternalModuleDependency` from a series of strings.

#### `ProjectDependency` `project`()

Note: This method is incubating and may change in a future version of Gradle.

Returns the current project as a `ProjectDependency`.

#### `ProjectDependency` `project`(`String` projectPath)

Note: This method is incubating and may change in a future version of Gradle.

Converts an absolute or relative path to a project into a `ProjectDependency`. Project paths are separated by colons. This method fails if the project cannot be found.