Gradle

Updated: 17 December 2025

Notes

  • “Gradle is the open source build system of choice for Java, Android, and Kotlin developers …”
  • https://gradle.org/
  • Gradle config and dependencies are at ~/.gradle
  • Default Java test framework for Gradle version 8.14.3 is JUnit Jupiter.

See a list of available tasks

./gradlew tasks

Run a build

./gradlew <task> ...

Make sure the output of checkstyle is displayed in the console

./gradlew clean build 2>&1 | grep ClickBookResult

Pipe both stdout and stderr output to grep

./gradlew clean build 2>&1 | grep FindMeInBuildOutput

Create a brand new Gradle project

gradle init

Run a single test method from a test class, which exists in the sub-project pom

./gradlew :pom:test --tests uk.christaylordev.TheTestClass.TheTestMethod

Show Group, Artifact and Version via the properties task

./gradlew properties | grep 'group\|name\|version\>'