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.

getMetadata

@Nullable
abstract fun getMetadata(): @Nullable ComponentMetadata(source)

Gets the metadata of the component.

The metadata may not be available, in which case null is returned. Unavailable metadata may be caused by a module published without associated metadata.

Return

the ComponentMetadata or null if not available

Since

5.0