# JvmComponentDependencies

@Incubating
interface JvmComponentDependencies : PlatformDependencyModifiers, TestFixturesDependencyModifiers, GradleDependencies(source)

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

#### Since

7.3

#### See also

DependencyHandler

For more information.

## Functions

constraint
Link copied to clipboard
open fun constraint(dependencyConstraintNotation: CharSequence): DependencyConstraint
open fun constraint(dependencyConstraint: Provider<out MinimalExternalModuleDependency>): Provider<out DependencyConstraint>
getAnnotationProcessor
Link copied to clipboard
abstract fun getAnnotationProcessor(): DependencyCollector
Returns a DependencyCollector that collects the set of annotation processor dependencies.
getCompileOnly
Link copied to clipboard
abstract fun getCompileOnly(): DependencyCollector
Returns a DependencyCollector that collects the set of compile-only dependencies.
getDependencyConstraintFactory
Link copied to clipboard
abstract fun getDependencyConstraintFactory(): DependencyConstraintFactory
getDependencyFactory
Link copied to clipboard
abstract fun getDependencyFactory(): DependencyFactory
getEnforcedPlatform
Link copied to clipboard
abstract fun getEnforcedPlatform(): PlatformDependencyModifiers.EnforcedPlatformDependencyModifier
getImplementation
Link copied to clipboard
abstract fun getImplementation(): DependencyCollector
Returns a DependencyCollector that collects the set of implementation dependencies.
getObjectFactory
Link copied to clipboard
abstract fun getObjectFactory(): ObjectFactory
getPlatform
Link copied to clipboard
abstract fun getPlatform(): PlatformDependencyModifiers.PlatformDependencyModifier
getProject
Link copied to clipboard
abstract fun getProject(): Project
getRuntimeOnly
Link copied to clipboard
abstract fun getRuntimeOnly(): DependencyCollector
Returns a DependencyCollector that collects the set of runtime-only dependencies.
getTestFixtures
Link copied to clipboard
abstract fun getTestFixtures(): TestFixturesDependencyModifiers.TestFixturesDependencyModifier
gradleApi
Link copied to clipboard
open fun gradleApi(): Dependency
gradleTestKit
Link copied to clipboard
open fun gradleTestKit(): Dependency
localGroovy
Link copied to clipboard
open fun localGroovy(): Dependency
module
Link copied to clipboard
open fun module(dependencyNotation: CharSequence): ExternalModuleDependency
module
Link copied to clipboard
fun Dependencies. module(group: String?, name: String, version: String?): ExternalModuleDependency

Creates a dependency based on the group, name and version (GAV) coordinates.

project
Link copied to clipboard
open fun project(projectPath: String): ProjectDependency