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.

api

abstract fun api(notation: Any)(source)

Adds an API dependency to this library. An API dependency is made visible to consumers that are compiled against this component.

Since

4.6

Parameters

notation

The dependency notation, as per create.


abstract fun api(notation: Any, action: Action<in ExternalModuleDependency>)(source)

Adds an API dependency to this library. An API dependency is made visible to consumers that are compiled against this component.

Since

4.6

Parameters

notation

The dependency notation, as per create.

action

The action to run to configure the dependency.