# apply

abstract fun apply(id: String): Plugin(source)

Has the same behavior as apply except that the plugin is specified via its id. Not all plugins have an id.

#### Return

The plugin which has been used against the project.

#### Parameters

id

The id of the plugin to be applied.

abstract fun <T : Plugin?> apply(type: Class<T>): T(source)

Applies a plugin to the project. This usually means that the plugin uses the project API to add and modify the state of the project. This method can be called an arbitrary number of times for a particular plugin type. The plugin will be actually used only the first time this method is called.

#### Return

The plugin which has been used against the project.

#### Parameters

type

The type of the plugin to be used