Skip to content
Latchkey

gradle properties: Usage & Common CI Errors

Print every project property the build resolved - version, group, and more.

properties is the built-in Gradle task that prints the selected project’s properties, including version, group, the build directory, and any properties passed via -P or gradle.properties. It is the way to confirm what configuration a build actually resolved.

What it does

properties lists the project’s property values as Gradle sees them after applying gradle.properties, -P flags, and environment overrides. It is the Gradle analogue of inspecting an effective configuration when a value differs between local and CI.

Common usage

Terminal
./gradlew properties
./gradlew :app:properties
./gradlew properties -Pversion=1.4.0   # see an overridden property

Common error in CI (and the fix)

Symptom: a build publishes the wrong version, or a property is unexpectedly "unspecified" in CI. Cause: a -P override or a gradle.properties present locally is missing on the CI agent (or vice versa). Fix: run ./gradlew properties on the CI agent to see the resolved values, then supply the missing value via -Pname=value or an ORG_GRADLE_PROJECT_name environment variable so CI matches the intended configuration.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →