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.

getMainComponent

@Nullable
abstract fun getMainComponent(): @Nullable CppComponent(source)

Returns the main C++ component of this project, if any.

Return

the main component or null when the project does not have a main component. The component will implement either CppApplication or CppLibrary.

Since

4.10