Skip to content

Commit b69df0d

Browse files
require Java 17 for Jackson 3
1 parent a8fb300 commit b69df0d

2 files changed

Lines changed: 17 additions & 0 deletions

File tree

modules/openapi-generator/src/main/resources/Java/libraries/native/build.gradle.mustache

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,14 @@ repositories {
2121
apply plugin: 'java'
2222
apply plugin: 'maven-publish'
2323

24+
{{^useJackson3}}
2425
sourceCompatibility = JavaVersion.VERSION_11
2526
targetCompatibility = JavaVersion.VERSION_11
27+
{{/useJackson3}}
28+
{{#useJackson3}}
29+
sourceCompatibility = JavaVersion.VERSION_17
30+
targetCompatibility = JavaVersion.VERSION_17
31+
{{/useJackson3}}
2632

2733
// Some text from the schema is copy pasted into the source files as UTF-8
2834
// but the default still seems to be to use platform encoding
@@ -128,6 +134,11 @@ dependencies {
128134
implementation "org.apache.commons:commons-lang3:$commons_lang3_version"
129135
{{/useReflectionEqualsHashCode}}
130136
testImplementation "org.junit.jupiter:junit-jupiter-api:$junit_version"
137+
testRuntimeOnly "org.junit.jupiter:junit-jupiter-engine:$junit_version"
138+
}
139+
140+
test {
141+
useJUnitPlatform()
131142
}
132143

133144
// Use spotless plugin to automatically format code, remove unused import, etc

modules/openapi-generator/src/main/resources/Java/libraries/native/pom.mustache

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -322,8 +322,14 @@
322322
{{#swagger2AnnotationLibrary}}
323323
<swagger-annotations-version>2.2.15</swagger-annotations-version>
324324
{{/swagger2AnnotationLibrary}}
325+
{{^useJackson3}}
325326
<maven.compiler.source>11</maven.compiler.source>
326327
<maven.compiler.target>11</maven.compiler.target>
328+
{{/useJackson3}}
329+
{{#useJackson3}}
330+
<maven.compiler.source>17</maven.compiler.source>
331+
<maven.compiler.target>17</maven.compiler.target>
332+
{{/useJackson3}}
327333
{{^useJackson3}}
328334
<jackson-version>2.19.2</jackson-version>
329335
<jackson-databind-nullable-version>0.2.9</jackson-databind-nullable-version>

0 commit comments

Comments
 (0)