File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -13,24 +13,29 @@ jobs:
1313 - name : Checkout
1414 uses : actions/checkout@v4
1515
16- - name : Set up Java 25 (runtime)
16+ - name : Set up Java 21 (runtime)
17+ id : java21
1718 uses : actions/setup-java@v4
1819 with :
1920 distribution : temurin
20- java-version : 25
21+ java-version : 21
2122
2223 - name : Set up Gradle 8.10.2
2324 uses : gradle/actions/setup-gradle@v3
2425 with :
2526 gradle-version : 8.10.2
2627
2728 - name : Gradle Build (no caches, verbose)
29+ env :
30+ JAVA_HOME : ${{ steps.java21.outputs.path }}
31+ GRADLE_JAVA_HOME : ${{ steps.java21.outputs.path }}
2832 run : |
33+ echo JAVA_HOME=$JAVA_HOME
2934 gradle --version
3035 java -version
3136 # 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)
37+ gradle build -PjavaTarget=21 --no-daemon --no-configuration-cache --no-build-cache --stacktrace || \
38+ (sleep 5 && gradle build -PjavaTarget=21 --no-daemon --no-configuration-cache --no-build-cache --stacktrace)
3439
3540 - name : Diagnostic (versions + stacktrace)
3641 run : |
Original file line number Diff line number Diff line change 4343 echo "artifact=build/libs/*.jar" >> $GITHUB_OUTPUT
4444 fi
4545
46- - name : Set up Java (runtime + toolchain)
46+ - name : Set up Java 21 (runtime)
47+ id : java21
48+ uses : actions/setup-java@v4
49+ with :
50+ distribution : temurin
51+ java-version : 21
52+
53+ - name : Set up Java (toolchain target)
4754 uses : actions/setup-java@v4
4855 with :
4956 distribution : temurin
6572
6673 - name : Build with Gradle (no caches)
6774 if : steps.plan.outputs.build_system == 'gradle'
75+ env :
76+ JAVA_HOME : ${{ steps.java21.outputs.path }}
77+ GRADLE_JAVA_HOME : ${{ steps.java21.outputs.path }}
6878 run : |
6979 gradle --version
7080 java -version
You can’t perform that action at this time.
0 commit comments