Skip to content

Use setup-gradle

Use setup-gradle #59

Workflow file for this run

name: Java
on:
push:
branches: ["main"]
paths:
- .github/workflows/java.yml
- java/**
pull_request:
branches: ["main"]
paths:
- .github/workflows/java.yml
- java/**
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure Java
uses: actions/setup-java@v4
with:
java-version: "21"
distribution: "temurin"
- name: Gradle cache
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-java-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-java
- name: Build
uses: gradle/setup-gradle@v3
with:
arguments: build
build-root-directory: java