Table of Contents
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, like JvmTestSuite
.
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, and are added to the annotation processor classpath
Property | Description |
annotationProcessor | Incubating Returns a |
compileOnly | Incubating Returns a |
implementation | Incubating Returns a |
runtimeOnly | Incubating Returns a |
Method | Description |
enforcedPlatform(dependency) | Incubating Takes a given |
enforcedPlatform(dependencyNotation) | Incubating Create an |
enforcedPlatform(providerToDependency) | Incubating Takes a given |
enforcedPlatform(providerConvertibleToDependency) | Incubating Takes a given |
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 |
module(group, name, version) | Incubating Create an |
platform(dependency) | Incubating Takes a given |
platform(dependencyNotation) | Incubating Create an |
platform(providerToDependency) | Incubating Takes a given |
platform(providerConvertibleToDependency) | Incubating Takes a given |
project() | Incubating Returns the current project as a |
project(projectPath) | Incubating Converts an absolute or relative path to a project into a |
testFixtures(dependency) | Incubating Takes a given |
testFixtures(dependencyNotation) | Incubating Create an |
testFixtures(providerToDependency) | Incubating Takes a given |
testFixtures(providerConvertibleToDependency) | Incubating Takes a given |
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.
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.
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.
Note: This method is incubating and may change in a future version of Gradle.
Takes a given ModuleDependency
and modifies it to select the Enforced Platform variant of the given module.
ExternalModuleDependency
enforcedPlatform
(CharSequence
dependencyNotation)
Note: This method is incubating and may change in a future version of Gradle.
Create an ExternalModuleDependency
from the given notation and modifies it to select the Enforced Platform variant of the given module.
Note: This method is incubating and may change in a future version of Gradle.
Takes a given Provider
to a ModuleDependency
and modifies the dependency to select the Enforced Platform variant of the given module.
Provider
<? extends MinimalExternalModuleDependency
>
enforcedPlatform
(ProviderConvertible
<? extends MinimalExternalModuleDependency
>
providerConvertibleToDependency)
Provider
<? extends MinimalExternalModuleDependency
>ProviderConvertible
<? extends MinimalExternalModuleDependency
>Note: This method is incubating and may change in a future version of Gradle.
Takes a given Provider
to a MinimalExternalModuleDependency
and modifies the dependency to select the Enforced Platform variant of the given module.
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.
Note: This method is incubating and may change in a future version of Gradle.
Takes a given ModuleDependency
and modifies it to select the Platform variant of the given module.
ExternalModuleDependency
platform
(CharSequence
dependencyNotation)
Note: This method is incubating and may change in a future version of Gradle.
Create an ExternalModuleDependency
from the given notation and modifies it to select the Platform variant of the given module.
Note: This method is incubating and may change in a future version of Gradle.
Takes a given Provider
to a ModuleDependency
and modifies the dependency to select the Platform variant of the given module.
Provider
<? extends MinimalExternalModuleDependency
>
platform
(ProviderConvertible
<? extends MinimalExternalModuleDependency
>
providerConvertibleToDependency)
Provider
<? extends MinimalExternalModuleDependency
>ProviderConvertible
<? extends MinimalExternalModuleDependency
>Note: This method is incubating and may change in a future version of Gradle.
Takes a given Provider
to a MinimalExternalModuleDependency
and modifies the dependency to select the Platform variant of the given module.
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.
Note: This method is incubating and may change in a future version of Gradle.
Takes a given ModuleDependency
and modifies it to select the Test Fixtures variant of the given module.
ExternalModuleDependency
testFixtures
(CharSequence
dependencyNotation)
Note: This method is incubating and may change in a future version of Gradle.
Create an ExternalModuleDependency
from the given notation and modifies it to select the Test Fixtures variant of the given module.
Provider
<? extends ExternalModuleDependency
>
testFixtures
(Provider
<? extends ExternalModuleDependency
>
providerToDependency)
Provider
<? extends ExternalModuleDependency
>Provider
<? extends ExternalModuleDependency
>Note: This method is incubating and may change in a future version of Gradle.
Takes a given Provider
to a ExternalModuleDependency
and modifies the dependency to select the Test Fixtures variant of the given module.
Provider
<? extends MinimalExternalModuleDependency
>
testFixtures
(ProviderConvertible
<? extends MinimalExternalModuleDependency
>
providerConvertibleToDependency)
Provider
<? extends MinimalExternalModuleDependency
>ProviderConvertible
<? extends MinimalExternalModuleDependency
>Note: This method is incubating and may change in a future version of Gradle.
Takes a given Provider
to a MinimalExternalModuleDependency
and modifies the dependency to select the Test Fixtures variant of the given module.