TeamCity Pipelines Help


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

Gradle Step Settings


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.

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.


If this option is enabled, TeamCity detects Gradle modules affected by changes in the build and starts the :buildDependents command only for these modules. See this article for more information: Multi-Project Building and Testing.

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.

Gradle Command Line Parameters

The space-separated list of optional command line parameters.

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.

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.

JDK Home

Allows you to utilize a custom JDK that should be used instead of the agent's default JDK referenced by the JDK_HOME environment variable.

JVM Arguments

Optional parameters passed to the JVM that runs your build. For example, you can specify the maximum heap size or enable remote debugging.

Last modified: 07 March 2023