gradle
8.5

# getId

abstract fun getId(): ComponentIdentifier(source)

Returns the identifier of this component. This can be used to uniquely identify the component within the current build, but it is not necessarily unique between different builds.

The return type is declared as an opaque ComponentIdentifier, however the identifier may also implement one of the following interfaces:

- org.gradle.api.artifacts.component.ProjectComponentIdentifier for those component instances which are produced by the current build.
- org.gradle.api.artifacts.component.ModuleComponentIdentifier for those component instances which are found in some repository.

#### Return

the identifier of this component