lfreleng-actions/gradle-build
Set up a specific JDK version and run a Gradle build
View on GitHubTrust Signals
- Scorecard Score
- not yet scored
- Maintenance Recency
- Activelast commit Jul 8, 2026
- License
- None
Pinned Snippet
uses: lfreleng-actions/gradle-build-action@0e844f5c498403579bfba3a2eaf2ff7705719ff5 # v0.4.1tags can be moved; commit SHAs can't. why a SHA?
Inputs
| name | description | required | default |
|---|---|---|---|
| java-version | OpenJDK version (ignored when 'java-version-file' is set). Defaults to 21 (LTS) | no | 21 |
| jdk-version | Deprecated alias for java-version; retained for backward compatibility | no | "" |
| distribution | OpenJDK distribution | no | temurin |
| java-version-file | Path to a '.java-version' file (takes precedence over java-version) | no | — |
| java-package | JDK package type: 'jdk', 'jre', 'jdk+fx', or 'jre+fx' | no | jdk |
| architecture | Architecture of the JDK package (defaults to the runner's architecture) | no | — |
| check-latest | When 'true', resolve the latest version satisfying the version spec | no | false |
| setup-java-token | Token used by setup-java when fetching version manifests (useful on GHES or under rate limits) | no | — |
| path | Path to the Gradle project (directory containing gradlew) | no | . |
| build-arguments | Arguments to pass to the Gradle Wrapper (default: build) | no | build |
| gradle-version | Gradle version to use. If unset the project's Gradle Wrapper is used | no | — |
| artifact-upload | Upload Gradle test reports as a workflow artefact | no | true |
| artifact-name | Name for the uploaded artefact (defaults to gradle-build-<job>) | no | "" |
| cache-provider | Caching implementation: 'enhanced' (default) or 'basic' (MIT) | no | enhanced |
| cache-disabled | When 'true', all caching is disabled | no | false |
| cache-read-only | When 'true', restore cache entries but do not write new ones | no | false |
| cache-write-only | When 'true', save cache entries but do not restore them | no | false |
| cache-encryption-key | Base64 AES key used to encrypt configuration-cache data | no | — |
| cache-cleanup | Gradle User Home cleanup: 'never', 'on-success' (default) or 'always' | no | on-success |
| validate-wrappers | When 'true' (default) validate checksums of all gradlew jars | no | true |
| add-job-summary | Emit a Job Summary: 'never', 'always' (default), or 'on-failure' | no | always |
| add-job-summary-as-pr-comment | Post Job Summary as PR comment: 'never' (default), 'always', 'on-failure' | no | never |
| dependency-graph | Dependency snapshot mode: 'disabled' (default), 'generate', 'generate-and-submit', 'generate-submit-and-upload', 'generate-and-upload', 'download-and-submit' | no | disabled |
| build-scan-publish | Publish results as a Build Scan on scans.gradle.com | no | false |
| build-scan-terms-of-use-url | Build Scan terms of use URL (required if publishing) | no | — |
| build-scan-terms-of-use-agree | Set to 'yes' to agree to the Build Scan terms of use | no | — |
| develocity-url | URL of a Develocity server (enables injection) | no | — |
| develocity-access-key | Develocity access key (pass via secrets) | no | — |
Outputs
| name | description |
|---|---|
| build-scan-url | Link to the Build Scan generated by the Gradle build |
| gradle-version | Version of Gradle set up by the action |
| java-version | Actual version of the Java environment installed |
| java-distribution | Distribution of Java that was installed |
| java-home | Path to the installed Java environment (equivalent to JAVA_HOME) |
| artifact-name | Name of the uploaded test-report artefact (empty when not uploaded) |