# flatDir

abstract fun flatDir(@DelegatesTo(value = FlatDirectoryArtifactRepository::class) configureClosure: Closure): FlatDirectoryArtifactRepository(source)

Adds and configures a repository which will look for dependencies in a number of local directories.

#### Return

The repository.

#### Since

1.0

#### Parameters

configureClosure

The closure to execute to configure the repository.

abstract fun flatDir(action: Action<in FlatDirectoryArtifactRepository>): FlatDirectoryArtifactRepository(source)

Adds and configures a repository which will look for dependencies in a number of local directories.

#### Return

The repository.

#### Since

1.0

#### Parameters

action

The action to execute to configure the repository.

abstract fun flatDir(args: Map<String, out Any>): FlatDirectoryArtifactRepository(source)

### Deprecated

This method is scheduled to be removed in Gradle 10. Use flatDir instead.

Adds a resolver that looks into a number of directories for artifacts. The artifacts are expected to be located in the root of the specified directories. The resolver ignores any group/organization information specified in the dependency section of your build script. If you only use this kind of resolver you might specify your dependencies like `":junit:4.4"` instead of `"junit:junit:4.4"`. The following parameter are accepted as keys for the map:

`name` | (optional) The name of the repository. The default is a Hash value of the rootdir paths. The name is used in the console output, to point to information related to a particular repository. A name must be unique amongst a repository group.
`dirs` | Specifies a list of rootDirs where to look for dependencies. These are evaluated as per files

#### Return

the added resolver

#### Since

0.7

#### Parameters

args

The arguments used to configure the repository.

#### Throws

org.gradle.api.InvalidUserDataException

In the case neither rootDir nor rootDirs is specified of if both are specified.