CLion 2024.3 Help

Gradle

Settings | Build, Execution, Deployment | Gradle

Use this page to configure the Gradle project settings.

Item

Description

Gradle user home

Use this field to specify the location for Gradle to store its global configuration properties, initialization scripts, caches, log files, and so on. For more information, refer to Gradle documentation.

The default is set to $USER_HOME/.gradle. It can be overridden in one of the following ways:

  • You can set the GRADLE_USER_HOME environment variable (for example, %APPDATA%\.gradle). For more information, refer to Gradle documentation. The variable's value is picked up automatically. The new path is reflected in the field.

  • You can specify the location manually: type the location in the path or click the Browse button and in the dialog that opens, select the needed directory.

If the Gradle location is set in Use Gradle from with the Specified location option and its path is defined in the environment variable GRADLE_HOME or PATH, CLion deduces this location and suggests its path as the default value.

CLion also supports the custom Gradle location installed from the Homebrew package manager.

Enable parallel Gradle model fetching for Gradle 7.4+

Select this option to speed up the project's import.

This option is automatically disabled for the newly created projects. It is also disabled in File | New Projects Setup | Settings for New Projects.

If you check out a project from VCS that contains the .idea folder with already disabled parallel import feature, the project will be opened with the Enable parallel Gradle model fetching for Gradle 7.4+ disabled.

Gradle projects

This area contains the list of registered Gradle projects that are linked to your CLion project.

Download external annotations for dependencies

When this checkbox is selected, CLion downloads a file with a set of external annotations from the JetBrains public repository.

Gradle

Distribution

Use this list to configure a Gradle version for your project.

You can select one of the following options:

  • 'wrapper' task in Gradle build script: select this option to configure a Gradle wrapper according to the wrapper task configuration. It might be convenient if you prefer to control which Gradle version to use in the project.

    If you used the default Gradle wrapper option and then switched to the Gradle wrapper task configuration, changes you made in the task automatically update during the project import.

  • Specified location: select this option if you don't want to use the Gradle wrapper and prefer to manually download and use a specific Gradle version instead. Specify the location of your Gradle installation.

Gradle JVM

Use this field to specify the JVM under which CLion will run Gradle when you import the specified Gradle project and when you execute its tasks. The default is set to your project JDK.

Last modified: 08 October 2024