# stopGradleDaemonsOnExit

> If enabled, all Gradle daemons stop when the Unity Editor exits.

## Definition

* **Type:** Property
* **Namespace:** [UnityEditor.Android](/engine/6000.0/script-reference/unityeditor/android.md)
* **Assembly:** UnityEditor.Android.Extensions

```csharp
public static bool stopGradleDaemonsOnExit { get; set; }
```

### Examples

```csharp
using UnityEngine;
using UnityEditor;
using UnityEditor.Android;

public class GradleDaemonSample
{
    [MenuItem("Build/Toggle Gradle Daemons Stop On Exit")]
    public static void ToggleStopGradleDaemonsOnExit()
    {
        // Get the current state of the setting
        bool currentState = AndroidExternalToolsSettings.stopGradleDaemonsOnExit;
        // Toggle the setting to change its current state)
        AndroidExternalToolsSettings.stopGradleDaemonsOnExit = !currentState;
        // Log the result

        if (AndroidExternalToolsSettings.stopGradleDaemonsOnExit)
        {
            Debug.Log("Gradle Daemons will stop automatically when you exit the Editor.");
        }
        else
        {
            Debug.Log("Gradle Daemons will not stop automatically when you exit the Editor.");
        }
    }
}
```
