Skip to content

Commit 9732f7d

Browse files
committed
ci: run Gradle on JDK 25; disable caches; add retry; simplify JDK setup
1 parent b67353a commit 9732f7d

2 files changed

Lines changed: 15 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,7 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v4
1515

16-
- name: Set up Java 21 (run Gradle)
17-
uses: actions/setup-java@v4
18-
with:
19-
distribution: temurin
20-
java-version: 21
21-
22-
- name: Set up Java 25 (toolchain)
16+
- name: Set up Java 25 (runtime)
2317
uses: actions/setup-java@v4
2418
with:
2519
distribution: temurin
@@ -30,8 +24,13 @@ jobs:
3024
with:
3125
gradle-version: 8.10.2
3226

33-
- name: Gradle Build
34-
run: gradle build -PjavaTarget=21
27+
- name: Gradle Build (no caches, verbose)
28+
run: |
29+
gradle --version
30+
java -version
31+
# Retry once to mitigate transient infra/cache issues
32+
gradle build -PjavaTarget=25 --no-daemon --no-configuration-cache --no-build-cache --stacktrace || \
33+
(sleep 5 && gradle build -PjavaTarget=25 --no-daemon --no-configuration-cache --no-build-cache --stacktrace)
3534
3635
- name: Diagnostic (versions + stacktrace)
3736
run: |

.github/workflows/release-build.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,7 @@ jobs:
3737
echo "artifact=build/libs/*.jar" >> $GITHUB_OUTPUT
3838
fi
3939
40-
- name: Set up Java 21 (run Gradle)
41-
uses: actions/setup-java@v4
42-
with:
43-
distribution: temurin
44-
java-version: 21
45-
46-
- name: Set up Java (toolchain target)
40+
- name: Set up Java (runtime + toolchain)
4741
uses: actions/setup-java@v4
4842
with:
4943
distribution: temurin
@@ -63,9 +57,13 @@ jobs:
6357
with:
6458
gradle-version: 8.10.2
6559

66-
- name: Build with Gradle
60+
- name: Build with Gradle (no caches)
6761
if: steps.plan.outputs.build_system == 'gradle'
68-
run: gradle build -PprojVersion=${{ steps.plan.outputs.tag }} -PjavaTarget=${{ steps.plan.outputs.java }}
62+
run: |
63+
gradle --version
64+
java -version
65+
gradle build -PprojVersion=${{ steps.plan.outputs.tag }} -PjavaTarget=${{ steps.plan.outputs.java }} --no-daemon --no-configuration-cache --no-build-cache --stacktrace || \
66+
(sleep 5 && gradle build -PprojVersion=${{ steps.plan.outputs.tag }} -PjavaTarget=${{ steps.plan.outputs.java }} --no-daemon --no-configuration-cache --no-build-cache --stacktrace)
6967
7068
- name: Prepare latest asset name
7169
id: latest

0 commit comments

Comments
 (0)