# AddPlugin

> Adds a plugin.

## Definition

* **Type:** Method
* **Namespace:** [Unity.Android.Gradle](/engine/6000.7/script-reference/unity/android/gradle.md)
* **Assembly:** Unity.Android.Gradle

## AddPlugin(string, string, bool)

Adds a plugin.

```csharp
public GradlePlugin AddPlugin(string name, string version, bool apply = true)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Plugin name.**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Plugin version.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Should the plugin be applied.

### Returns

| Type                                                                                 | Description       |
| ------------------------------------------------------------------------------------ | ----------------- |
| [GradlePlugin](/engine/6000.7/script-reference/unity/android/gradle/gradleplugin.md) | The added plugin. |

## AddPlugin(string, bool)

Adds a plugin.

```csharp
public GradlePlugin AddPlugin(string name, bool apply = true)
```

### Parameters

**** (\[string]\(https\://learn.microsoft.com/dotnet/api/system.string)): Plugin name.**** (\[bool]\(https\://learn.microsoft.com/dotnet/api/system.boolean)): Should the plugin be applied.

### Returns

| Type                                                                                 | Description       |
| ------------------------------------------------------------------------------------ | ----------------- |
| [GradlePlugin](/engine/6000.7/script-reference/unity/android/gradle/gradleplugin.md) | The added plugin. |
