gradle
8.5

# 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

#### See also

DependencyHandler

For more information.

## Functions

getAnnotationProcessor
Link copied to clipboard
abstract fun getAnnotationProcessor(): DependencyAdder
Returns a DependencyAdder to add to the set of annotation processor dependencies.
getCompileOnly
Link copied to clipboard
abstract fun getCompileOnly(): DependencyAdder
Returns a DependencyAdder to add to the set of compile-only dependencies.
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(): DependencyAdder
Returns a DependencyAdder to add to 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(): DependencyAdder
Returns a DependencyAdder to add to 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