A GitHub Action to execute Gradle tasks with the Gradle Wrapper.
The action also implements some work usually done together with a gradle execution in a GitHub Actions workflow:
- caching the gradle distribution and project dependencies
- uploading build-artifacts
Required Arguments for the gradle execution, usually tasks and further settings. Default "tasks"
.
Required Cache-key for the gradle-distribution, usually some sort of hash of the gradle-wrapper.properties file. Default gradle-dists-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
.
Required Cache-key for gradle dependencies, usually some sort of hash of the .gradle-files. Default gradle-deps-${{ hashFiles('**/*.gradle*') }}
.
Optional artifacts to upload after the gradle execution. Artifacts are specified as a name and path separated by a space character, where the path can be a glob pattern. You can specify multiple artifacts declaring one per line.
- uses: actions/setup-java@v1 # setup java for gradle execution
- name: gradle execution
uses: christopherfrieler/gradle-wrapper-action@v0.4.1
with:
arguments: 'build --info'
artifacts: |
package build/libs/*.jar
If you have an idea, problem or question about the gradle-wrapper-action you can open an issue.
If you want to clone the repository and work on the code have a look at the DEVELOPING.md.