getName

abstract fun getName(): String(source)

The object's name.

Must be constant for the life of the object.

Implementations should not declare a Object#toString() that returns anything other than this name. Gradle derives the name from this method wherever it needs one, but renders the object with toString()} in diagnostics, so the two disagreeing produces output that contradicts the behavior it describes. This is easy to miss on an enum}, which inherits a toString()} returning Enum#name().