DependencyFactory

Factory class for creating Dependency instances, with strong typing.

An instance of the factory can be injected into a task, plugin or other object by annotating a public constructor or property getter method with javax.inject.Inject. It is also available via getDependencyFactory.

Note: This interface is not intended for implementation by build script or plugin authors.

Since

7.6

Functions

Link copied to clipboard
abstract fun create(dependencyNotation: CharSequence): ExternalModuleDependency
Create an ExternalModuleDependency from the "group:name:version:classifier@extension" notation.
abstract fun create(project: Project): ProjectDependency
Create a ProjectDependency from a Project.
abstract fun create(fileCollection: FileCollection): FileCollectionDependency
abstract fun create(@Nullable group: String, name: String, @Nullable version: String): ExternalModuleDependency
abstract fun create(@Nullable group: String, name: String, @Nullable version: String, @Nullable classifier: String, @Nullable extension: String): ExternalModuleDependency
Create an ExternalModuleDependency from a series of strings.
Link copied to clipboard
abstract fun gradleApi(): Dependency
Creates a dependency on the API of the current version of Gradle.
Link copied to clipboard
abstract fun gradleTestKit(): Dependency
Creates a dependency on the Gradle test-kit API.
Link copied to clipboard
abstract fun localGroovy(): Dependency
Creates a dependency on the version of Groovy that is distributed with the current version of Gradle.