gradle Verified current stable Not installed? Build Tools

Gradle / List Main Tasks Gradle

List Main Tasks Gradle

Use the 'gradle tasks' command to view all main tasks available in your Gradle build script.

$
Terminal
gradle tasks

When To Use

Identify executable tasks before starting your Gradle build process.

Terminal Output

Expected runtime feedback

Simulated preview
>
Output
> Task list tasks

> Build tasks
>   assemble - Assembles the outputs of the project.
>   build - Assembles and tests this project.

> Verification tasks
>   check - Runs all checks.
>   test - Runs the unit tests.

Command Breakdown

What each part is doing

gradle
Base Command
The executable that performs this operation. Here it runs Gradle before the shell applies any redirect operators.

How To Run

Execution path

  1. Step 1

    Open your terminal or command prompt.

  2. Step 2

    Navigate to your Gradle project directory.

  3. Step 3

    Run the command 'gradle tasks' to list available tasks.

Alternative Approaches

Comparable commands in other tools

Alternative build tools tools for the same job.