api / org.gradle.api.artifacts.repositories / FlatDirectoryArtifactRepository

FlatDirectoryArtifactRepository

interface FlatDirectoryArtifactRepository : ArtifactRepository

A repository that looks into a number of directories for artifacts. The artifacts are expected to be located in the root of the specified directories. The repository ignores any group/organization information specified in the dependency section of your build script. If you only use this kind of resolver you can specify your dependencies like :junit:4.8.1 instead of junit:junit:4.8.1.

To resolve a dependency, this resolver looks for one of the following files. It will return the first match it finds:

So, for example, to resolve :junit:junit:4.8.1, this repository will look for junit-4.8.1.jar and then junit.jar.

Functions

dir

abstract fun dir(dir: Any): Unit

Adds a directory where this repository will look for artifacts.

The provided value are evaluated as per org.gradle.api.Project#file(Object).

dirs

abstract fun dirs(vararg dirs: Any): Unit

Adds some directories where this repository will look for artifacts.

The provided values are evaluated as per org.gradle.api.Project#files(Object...).

getDirs

abstract fun getDirs(): MutableSet<File>

Returns the directories where this repository will look for artifacts.

setDirs

abstract fun setDirs(dirs: MutableSet<File>): Unit

Sets the directories where this repository will look for artifacts.

abstract fun setDirs(dirs: MutableIterable<*>): Unit

Sets the directories where this repository will look for artifacts.

The provided values are evaluated as per org.gradle.api.Project#files(Object...).

Inherited Functions

getName

abstract fun getName(): String

Returns the name for this repository. A name must be unique amongst a repository set. A default name is provided for the repository if none is provided.

The name is used in logging output and error reporting to point to information related to this repository.

setName

abstract fun setName(name: String): Unit

Sets the name for this repository. If this repository is to be added to an org.gradle.api.artifacts.ArtifactRepositoryContainer (including org.gradle.api.artifacts.dsl.RepositoryHandler), its name cannot be changed after it has been added to the container.