For AI agents: the documentation index is at https://docs.gradle.org/llms.txt. Request any page with the header Accept: text/markdown to get Markdown. User manual pages are also available as Markdown by replacing .html with .md in the URL.

maven

abstract fun maven(@DelegatesTo(value = MavenArtifactRepository::class) closure: Closure): MavenArtifactRepository(source)

Adds and configures a Maven repository. Newly created instance of MavenArtifactRepository is passed as an argument to the closure.

Return

The added repository.

Since

1.0

Parameters

closure

The closure to use to configure the repository.


Adds and configures a Maven repository.

Return

The added repository.

Since

1.0

Parameters

action

The action to use to configure the repository.