server/priv/docs/en/guides/install-gradle-plugin.md
Tuist provides a Gradle plugin that integrates with your Gradle project to enable features like <.localized_link href="/guides/features/cache/gradle-cache">remote build caching</.localized_link> and <.localized_link href="/guides/features/build-insights/gradle">build insights</.localized_link>. This guide walks you through installing and configuring the plugin.
[!WARNING] Requirements
- <.localized_link href="/guides/install-tuist">Tuist CLI</.localized_link> 4.138.1 or later
- A Gradle project
Run the following command in your Gradle project root:
::: code-group
mise x tuist@latest -- tuist init
tuist init
:::
The command will walk you through authenticating, creating or selecting a Tuist project, and generating the configuration for your Gradle project.
After running tuist init, you'll need to add the Tuist plugin to your settings.gradle.kts as instructed by the command output:
plugins {
id("dev.tuist") version "0.1.0"
}
While tuist init authenticates you locally, your teammates and CI environments will need to authenticate separately.
Each teammate should run the following to get access to the Tuist features on their machine:
tuist auth login
For CI, follow the <.localized_link href="/guides/integrations/continuous-integration#authentication">CI authentication guide</.localized_link> to configure authentication for your environment.
The following options are available in the tuist extension block in settings.gradle.kts:
| Option | Type | Default | Description |
|---|---|---|---|
project | String? | null (optional) | The project identifier in account/project format. If not set, the plugin reads it from tuist.toml. |
executablePath | String? | null (uses tuist from PATH) | Path to the Tuist CLI executable. |
url | String? | null | The base URL of the Tuist server. If not set, it defaults to "https://tuist.dev" or the value defined in tuist.toml. |
uploadInBackground | Boolean? | null | Whether to upload build and test insights in the background. When null (default), uploads run in the background for local builds and in the foreground on CI. |
[!NOTE] Tuist.toml
The recommended way to configure
project(and optionallyurl) is through atuist.tomlfile in your project root. This way the configuration is shared between the Tuist CLI and the Gradle plugin. You can still override these values insettings.gradle.ktsif needed.
If your network routes outbound traffic through an HTTP proxy, see the <.localized_link href="/guides/integrations/http-proxy">HTTP proxy guide</.localized_link>.
Once the plugin is installed and configured, you can enable: