api / org.gradle.api.artifacts.repositories / MavenArtifactRepository / setUrl

setUrl

abstract fun setUrl(url: URI): Unit

Sets the base URL of this repository. This URL is used to find both POMs and artifact files. You can add additional URLs to use to look for artifact files, such as jars, using .

Parameters

url - The base URL.

Since
4.0

abstract fun setUrl(url: Any): Unit

Sets the base URL of this repository. This URL is used to find both POMs and artifact files. You can add additional URLs to use to look for artifact files, such as jars, using .

The provided value is evaluated as per org.gradle.api.Project#uri(Object). This means, for example, you can pass in a File object, or a relative path to be evaluated relative to the project directory.

Parameters

url - The base URL.