Skip to content

Commit d1994be

Browse files
committed
Build with JDK 11 when required
1 parent fb0c695 commit d1994be

File tree

1 file changed

+23
-1
lines changed

1 file changed

+23
-1
lines changed

.github/workflows/build.yml

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,14 @@ jobs:
9494
.gradle/wrapper
9595
# refresh cache every month to avoid unlimited growth
9696
key: gradle-examples-${{ matrix.db }}-${{ steps.get-date.outputs.yearmonth }}
97+
- name: Set up JDK 11
98+
if: ${{ contains( inputs.branch, 'wip/2' ) }}
99+
uses: actions/[email protected]
100+
with:
101+
distribution: 'temurin'
102+
java-version: 11
97103
- name: Set up JDK 17
104+
if: ${{ !contains( inputs.branch, 'wip/2' ) }}
98105
uses: actions/[email protected]
99106
with:
100107
distribution: 'temurin'
@@ -136,8 +143,16 @@ jobs:
136143
.gradle/wrapper
137144
# refresh cache every month to avoid unlimited growth
138145
key: gradle-db-${{ matrix.db }}-${{ steps.get-date.outputs.yearmonth }}
146+
- name: Set up JDK 11
147+
if: ${{ contains( inputs.branch, 'wip/2' ) }}
148+
uses: actions/[email protected]
149+
with:
150+
distribution: 'temurin'
151+
java-version: 11
139152
- name: Set up JDK 17
153+
if: ${{ !contains( inputs.branch, 'wip/2' ) }}
140154
uses: actions/[email protected]
155+
141156
with:
142157
distribution: 'temurin'
143158
java-version: 17
@@ -244,8 +259,15 @@ jobs:
244259
- name: Export path to JDK ${{ matrix.java.name }}
245260
id: testjdk-exportpath
246261
run: echo "::set-output name=path::${JAVA_HOME}"
247-
# Always use JDK 11 to build the main code: that's what we use for releases.
262+
- name: Set up JDK 11
263+
if: ${{ contains( inputs.branch, 'wip/2' ) }}
264+
uses: actions/[email protected]
265+
with:
266+
distribution: 'temurin'
267+
java-version: 11
268+
check-latest: true
248269
- name: Set up JDK 17
270+
if: ${{ !contains( inputs.branch, 'wip/2' ) }}
249271
uses: actions/[email protected]
250272
with:
251273
distribution: 'temurin'

0 commit comments

Comments
 (0)