api / org.gradle.language / LibraryDependencies / api

api

abstract fun api(notation: Any): Unit

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

Parameters

notation - The dependency notation, as per org.gradle.api.artifacts.dsl.DependencyHandler#create(Object).

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

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

Parameters

notation - The dependency notation, as per org.gradle.api.artifacts.dsl.DependencyHandler#create(Object).

action - The action to run to configure the dependency.