TeamCity Pipelines Help

Gradle

The "Gradle" Step type is designed to run Gradle projects.

Gradle Step Settings

Tasks

A space-separated list of Gradle tasks to perform. For example, :myproject:clean, :myproject:build, or clean build. If you leave this field blank, the Step will run the "default" task.

Use Gradle Wrapper & Gradle Wrapper Path

Enable the "Use Gradle Wrapper" option to employ the Wrapper, which allows you to download and install the specific Gradle version. TeamCity will utilize the Wrapper file specified in the "Gradle Wrapper Path" field, or (if no path was set) attempt to locate this file under its default gradle/wrapper directory.

JDK

Allows you to select the required Java version. TeamCity lists a number of standard Java versions typically available on JetBrains-hosted agents.

Default Java options

By choosing any value, you point TeamCity to the required directory where the target Java is installed. For example, if you choose "Default", TeamCity will look in the directory whose path is stored in the env.JAVA_HOME parameter. Similarly, selecting "JDK 11 ARM64" points TeamCity to the directory stored in the env.JDK_11_0_ARM64 parameter.

If you want to explicitly specify a folder in which TeamCity should look for the required Java, choose "Custom" and enter your custom path.

Custom Java path

Note that you can use parameter references instead of absolute values.

Gradle Home

The path to the Gradle home directory (the parent of the "bin" directory). If not specified, TeamCity uses the agent's default Gradle installation. You can also use Gradle Wrapper (see below) to download and use a custom version of Gradle.

Build File

The path to the Gradle build file (build.gradle), relative to the working directory. If empty (default), TeamCity attempts to automatically locate this file inside the working directory.

Gradle Parameters

The space-separated list of optional command line parameters.

Enable Debug

Specifies whether the Gradle should run in "Debug" mode (launched with the -d parameter). In this mode, Gradle outputs all of its build messages to the build log.

Enable Stacktrace

Specifies whether the Gradle should run in "Stacktrace" mode (launched with the -s parameter). In this mode, Gradle publishes truncated stacktraces to the build log.

Last modified: 18 September 2024