@@ -23,11 +23,10 @@ jobs:
2323 uses : actions/checkout@v4
2424 with :
2525 fetch-depth : 0
26- - name : Install JDK 11
27- uses : actions/setup-java@v4
26+ - uses : actions/setup-java@v4
2827 with :
2928 distribution : " temurin"
30- java-version : 11
29+ java-version : 21
3130 - name : gradle caching
3231 uses : gradle/actions/setup-gradle@v4
3332 - name : spotlessCheck
@@ -41,33 +40,32 @@ jobs:
4140 matrix :
4241 kind : [maven, gradle]
4342 # Test on the latest Java version once Gradle & Maven support it.
44- jre : [11, 17, 21, 23]
43+ jre : [17, 21, 23]
4544 os : [ubuntu-latest]
4645 include :
4746 # test windows at the diagonals of the above matrix
4847 - kind : maven
49- jre : 11
48+ jre : 17
5049 os : windows-latest
5150 - kind : gradle
5251 jre : 17
5352 os : windows-latest
5453 # npm on linux only (crazy slow on windows)
5554 - kind : npm
56- jre : 11
55+ jre : 17
5756 os : ubuntu-latest
5857 - kind : shfmt
59- jre : 11
58+ jre : 17
6059 os : ubuntu-latest
6160 shfmt-version : v3.8.0
6261 - kind : idea
63- jre : 11
62+ jre : 17
6463 os : ubuntu-latest
6564 runs-on : ${{ matrix.os }}
6665 steps :
6766 - name : Checkout
6867 uses : actions/checkout@v4
69- - name : Install JDK ${{ matrix.distribution }} ${{ matrix.java_version }}
70- uses : actions/setup-java@v4
68+ - uses : actions/setup-java@v4
7169 with :
7270 distribution : " temurin"
7371 java-version : ${{ matrix.jre }}
@@ -111,3 +109,37 @@ jobs:
111109 check_name : JUnit ${{ matrix.kind }} ${{ matrix.jre }} ${{ matrix.os }}
112110 report_paths : ' */build/test-results/*/TEST-*.xml'
113111 check_retries : true
112+
113+ # Gradle 9 requires Java 17 or higher, we use Gradle 8.14 (instead of gradlew) to build on Java 11.
114+ build-on-java-11 :
115+ needs : sanityCheck
116+ strategy :
117+ fail-fast : false
118+ matrix :
119+ kind : [maven, gradle]
120+ jre : [11]
121+ os : [ubuntu-latest]
122+ runs-on : ${{ matrix.os }}
123+ steps :
124+ - name : Checkout
125+ uses : actions/checkout@v4
126+ - uses : actions/setup-java@v4
127+ with :
128+ distribution : " temurin"
129+ java-version : ${{ matrix.jre }}
130+ - uses : gradle/actions/setup-gradle@v4
131+ with :
132+ gradle-version : 8.14.2
133+ - name : build (maven-only)
134+ if : matrix.kind == 'maven'
135+ run : gradle :plugin-maven:build -x spotlessCheck
136+ - name : build (everything-but-maven)
137+ if : matrix.kind == 'gradle'
138+ run : gradle build -x spotlessCheck -PSPOTLESS_EXCLUDE_MAVEN=true
139+ - name : junit result
140+ uses : mikepenz/action-junit-report@v5
141+ if : always() # always run even if the previous step fails
142+ with :
143+ check_name : JUnit ${{ matrix.kind }} ${{ matrix.jre }} ${{ matrix.os }}
144+ report_paths : ' */build/test-results/*/TEST-*.xml'
145+ check_retries : true
0 commit comments