api / org.gradle.api.artifacts.repositories / ArtifactRepository / setName

setName

abstract fun setName(name: String): Unit

Sets the name for this repository. If this repository is to be added to an org.gradle.api.artifacts.ArtifactRepositoryContainer (including org.gradle.api.artifacts.dsl.RepositoryHandler), its name cannot be changed after it has been added to the container.

Parameters

name - The name. Must not be null.

Exceptions

IllegalStateException - If the name is set after it has been added to the container.