flatDir

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.
dirsSpecifies a list of rootDirs where to look for dependencies. These are evaluated as per files

Examples:

repositories {
    flatDir name: 'libs', dirs: "$projectDir/libs"
    flatDir dirs: ["$projectDir/libs1", "$projectDir/libs2"]
}

Return

the added resolver

Parameters

args

The arguments used to configure the repository.

Throws

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


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.

Parameters

configureClosure

The closure to execute to configure the repository.


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

Return

The repository.

Parameters

action

The action to execute to configure the repository.