-
Notifications
You must be signed in to change notification settings - Fork 5
45 lines (37 loc) · 1.24 KB
/
gradle-check.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: Gradle Check
on:
push:
branches:
- master
pull_request:
jobs:
check:
strategy:
matrix:
os: [ ubuntu-latest, macOS-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: gradle/actions/wrapper-validation@v3
- uses: oracle-actions/setup-java@v1
if: ${{ vars.GRADLE_JAVA_VERSION != vars.JAVA_VERSION }}
with:
website: jdk.java.net
release: ${{ vars.GRADLE_JAVA_VERSION }}
- run: |
printf "org.gradle.java.home=%s" "$JAVA_HOME" > gradle.properties
java --version
if: ${{ vars.GRADLE_JAVA_VERSION != vars.JAVA_VERSION }}
- uses: oracle-actions/setup-java@v1
with:
website: jdk.java.net
release: ${{ vars.JAVA_VERSION }}
- run: printf "org.gradle.java.home=%s" "$JAVA_HOME" > gradle.properties
if: ${{ vars.GRADLE_JAVA_VERSION == vars.JAVA_VERSION }}
- name: Gradle Check
run: |
printf "\norg.gradle.java.installations.paths=%s" "$JAVA_HOME" >> gradle.properties
java --version
./gradlew --stacktrace --no-daemon -PtargetJava=${{ vars.JAVA_VERSION }} check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}