Skip to content

Commit 1ab021f

Browse files
committed
The org.openapi.generator requires JDK 11 to generate the sources. Generated code still works with Java 8.
Relates to OpenAPITools/openapi-generator#15553
1 parent 8013e96 commit 1ab021f

File tree

4 files changed

+16
-4
lines changed

4 files changed

+16
-4
lines changed

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
# - windows-latest
2424
# - macos-latest
2525
java:
26-
- 8
26+
- 11
2727
# - 17
2828
runs-on: ${{ matrix.os }}
2929
timeout-minutes: 20

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
- windows-latest
2525
- macos-latest
2626
java:
27-
- 8
27+
- 11
2828
- 17
2929
runs-on: ${{ matrix.os }}
3030
timeout-minutes: 20

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
# - windows-latest
2626
# - macos-latest
2727
java:
28-
- 8
28+
- 11
2929
# - 17
3030
runs-on: ${{ matrix.os }}
3131
timeout-minutes: 20

api-model-v1-41/build.gradle.kts

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,11 @@ dependencies {
128128

129129
java {
130130
toolchain {
131-
languageVersion.set(JavaLanguageVersion.of(8))
131+
// The org.openapi.generator requires JDK 11 to generate the sources.
132+
// Generated code still works with Java 8.
133+
// See below where we use Java 8 to perform checks
134+
// See https://github.com/OpenAPITools/openapi-generator/pull/15553 for details.
135+
languageVersion.set(JavaLanguageVersion.of(11))
132136
}
133137
}
134138

@@ -138,6 +142,14 @@ tasks {
138142
}
139143
withType<Test> {
140144
useJUnitPlatform()
145+
146+
java {
147+
toolchain {
148+
// See above: the org.openapi.generator requires JDK 11 to generate the sources.
149+
// We're trying to ensure that the generated code still works with Java 8.
150+
languageVersion.set(JavaLanguageVersion.of(8))
151+
}
152+
}
141153
}
142154
}
143155

0 commit comments

Comments
 (0)