api / org.gradle.api.artifacts.repositories / IvyArtifactRepository / layout

layout

abstract fun layout(layoutName: String): Unit

Specifies the layout to use with this repository, based on the root url. See #layout(String, Closure).

Parameters

layoutName - The name of the layout to use.

abstract fun layout(layoutName: String, config: Action<out RepositoryLayout>): Unit

Specifies how the items of the repository are organized.

The layout is configured with the supplied closure.

Recognised values are as follows:

'gradle'

A Repository Layout that applies the following patterns:

'maven'

A Repository Layout that applies the following patterns:

Following the Maven convention, the 'organisation' value is further processed by replacing '.' with '/'.

'ivy'

A Repository Layout that applies the following patterns:

Note: this pattern is currently org.gradle.api.Incubating.

'pattern'

A repository layout that allows custom patterns to be defined. eg:

 repositories { ivy { layout 'pattern' , { artifact '[module]/[revision]/[artifact](.[ext])' ivy '[module]/[revision]/ivy.xml' } } } 

The available pattern tokens are listed as part of Ivy's Main Concepts documentation.

Parameters

layoutName - The name of the layout to use.

config - The action used to configure the layout.

Since
2.3 (feature was already present in Groovy DSL, this particular method introduced in 2.3)

abstract fun layout(layoutName: String, config: Closure<Any>): Unit

Specifies how the items of the repository are organized. See #layout(String, org.gradle.api.Action)

Parameters

layoutName - The name of the layout to use.

config - The closure used to configure the layout. An instance of RepositoryLayout is passed as a parameter to the closure.