5050 # formatter parses with. The IntelliJ plugin's tests stay on the runtime of the IDE they start.
5151 # JDK 21 itself is `build`, the check the default branch requires.
5252 jdk :
53- name : build (JDK ${{ matrix.jdk }}${{ matrix.ea && '-ea' || '' }} )
53+ name : build (JDK ${{ matrix.jdk }})
5454 runs-on : ubuntu-latest
5555 strategy :
5656 fail-fast : false
@@ -69,24 +69,23 @@ jobs:
6969 the test JVM, where they fail with "Unsupported class file major version 71". Those tests are left
7070 out until the wrapper's Gradle supports Java 27.
7171 # Value classes (JEP 401) are a preview feature of JDK 28, so until it is released the `value` modifier
72- # tests (#131) run on its early-access builds and are skipped everywhere else.
73- - jdk : 28
74- ea : true
72+ # tests (#131) run on its early-access builds and are skipped everywhere else. The version is spelled
73+ # as setup-java spells it; Gradle gets the number alone.
74+ - jdk : 28-ea
7575 gradle_args : -x :gradle-open-java-format:test
7676 gradle_args_reason : As on JDK 27, the wrapper's Gradle does not run on Java 28 either.
7777 steps :
7878 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
7979 with :
8080 persist-credentials : false
8181
82- # No problem matcher in this job: `build` annotates the warnings. An `ea` leg takes the newest
83- # early-access build of its version.
82+ # No problem matcher in this job: `build` annotates the warnings.
8483 - name : Install JDK ${{ matrix.jdk }} for the tests
8584 id : test-jdk
8685 uses : actions/setup-java@de7274f081f381c8f8158605e0321c36c376e2e6 # v6.0.1
8786 with :
8887 distribution : temurin
89- java-version : ${{ matrix.jdk }}${{ matrix.ea && '-ea' || '' }}
88+ java-version : ${{ matrix.jdk }}
9089 problem-matcher : false
9190
9291 # Installed last, so that it is the JAVA_HOME Gradle runs and compiles on.
@@ -106,11 +105,13 @@ jobs:
106105
107106 # Gradle does not look into the runner's tool cache, so it is told where the test JDK is. The path is
108107 # a step's output, so it reaches the shell as a variable rather than being pasted into the script.
108+ # -PjavaRuntime takes a number, so an early-access leg loses its -ea suffix here.
109109 - name : Build
110110 env :
111111 TEST_JDK : ${{ steps.test-jdk.outputs.path }}
112+ JDK : ${{ matrix.jdk }}
112113 run : >-
113- ./gradlew test -PjavaRuntime=${{ matrix.jdk }} ${{ matrix.gradle_args }}
114+ ./gradlew test -PjavaRuntime="${JDK%-ea}" ${{ matrix.gradle_args }}
114115 -Porg.gradle.java.installations.paths="$TEST_JDK"
115116
116117 - name : Publish Test Report
0 commit comments