Skip to content

Install the Gradle plugin

Tuist provides a Gradle plugin that integrates with your Gradle project to enable features like remote build caching and build insights. This guide walks you through installing and configuring the plugin.

REQUIREMENTS

1. Initialize Tuist

Run the following command in your Gradle project root:

bash
mise x tuist@latest -- tuist init
bash
tuist init

The command will walk you through authenticating, creating or selecting a Tuist project, and generating the configuration for your Gradle project.

2. Apply the plugin

After running tuist init, you'll need to add the Tuist plugin to your settings.gradle.kts as instructed by the command output:

kotlin
plugins {
    id("dev.tuist") version "0.1.0"
}

3. Authenticate your team and CI

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:

bash
tuist auth login

For CI, follow the CI authentication guide to configure authentication for your environment.

Configuration reference

The following options are available in the tuist extension block in settings.gradle.kts:

OptionTypeDefaultDescription
projectString?null (optional)The project identifier in account/project format. If not set, the plugin reads it from tuist.toml through the Tuist CLI.
executablePathString?null (uses tuist from PATH)Path to the Tuist CLI executable.
urlString?nullThe base URL of the Tuist server. If not set, it defaults to "https://tuist.dev" or the value defined in tuist.toml.
uploadInBackgroundBoolean?nullWhether 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.

TUIST.TOML

The recommended way to configure project (and optionally url) is through a tuist.toml file in your project root. This way the configuration is shared between the Tuist CLI and the Gradle plugin. You can still override these values in settings.gradle.kts if needed.

Next steps

Once the plugin is installed and configured, you can enable:

  • Remote build cache to share build artifacts across your team and CI.
  • Build insights to track task timings and cache behavior in the Tuist dashboard.
  • Test insights to track test performance and detect flaky tests.
  • Flaky tests to automatically detect, track, and quarantine flaky tests.

Released under the MIT License.