fix some deprecated warnings

This commit is contained in:
Michael Hoennig 2025-01-31 14:40:36 +01:00
parent 16252334b7
commit 313b373ce2

View File

@ -129,7 +129,7 @@ openapiProcessor {
processor 'io.openapiprocessor:openapi-processor-spring:2022.5' processor 'io.openapiprocessor:openapi-processor-spring:2022.5'
apiPath "$projectDir/src/main/resources/api-definition/api-definition.yaml" apiPath "$projectDir/src/main/resources/api-definition/api-definition.yaml"
mapping "$projectDir/src/main/resources/api-definition/api-mappings.yaml" mapping "$projectDir/src/main/resources/api-definition/api-mappings.yaml"
targetDir "$buildDir/generated/sources/openapi-javax" targetDir layout.buildDirectory.dir("generated/sources/openapi-javax")
showWarnings true showWarnings true
openApiNullable true openApiNullable true
} }
@ -138,7 +138,7 @@ openapiProcessor {
processor 'io.openapiprocessor:openapi-processor-spring:2022.5' processor 'io.openapiprocessor:openapi-processor-spring:2022.5'
apiPath "$projectDir/src/main/resources/api-definition/rbac/rbac.yaml" apiPath "$projectDir/src/main/resources/api-definition/rbac/rbac.yaml"
mapping "$projectDir/src/main/resources/api-definition/rbac/api-mappings.yaml" mapping "$projectDir/src/main/resources/api-definition/rbac/api-mappings.yaml"
targetDir "$buildDir/generated/sources/openapi-javax" targetDir layout.buildDirectory.dir("generated/sources/openapi-javax")
showWarnings true showWarnings true
openApiNullable true openApiNullable true
} }
@ -147,7 +147,7 @@ openapiProcessor {
processor 'io.openapiprocessor:openapi-processor-spring:2022.5' processor 'io.openapiprocessor:openapi-processor-spring:2022.5'
apiPath "$projectDir/src/main/resources/api-definition/test/test.yaml" apiPath "$projectDir/src/main/resources/api-definition/test/test.yaml"
mapping "$projectDir/src/main/resources/api-definition/test/api-mappings.yaml" mapping "$projectDir/src/main/resources/api-definition/test/api-mappings.yaml"
targetDir "$buildDir/generated/sources/openapi-javax" targetDir layout.buildDirectory.dir("generated/sources/openapi-javax")
showWarnings true showWarnings true
openApiNullable true openApiNullable true
} }
@ -156,7 +156,7 @@ openapiProcessor {
processor 'io.openapiprocessor:openapi-processor-spring:2022.5' processor 'io.openapiprocessor:openapi-processor-spring:2022.5'
apiPath "$projectDir/src/main/resources/api-definition/hs-office/hs-office.yaml" apiPath "$projectDir/src/main/resources/api-definition/hs-office/hs-office.yaml"
mapping "$projectDir/src/main/resources/api-definition/hs-office/api-mappings.yaml" mapping "$projectDir/src/main/resources/api-definition/hs-office/api-mappings.yaml"
targetDir "$buildDir/generated/sources/openapi-javax" targetDir layout.buildDirectory.dir("generated/sources/openapi-javax")
showWarnings true showWarnings true
openApiNullable true openApiNullable true
} }
@ -165,7 +165,7 @@ openapiProcessor {
processor 'io.openapiprocessor:openapi-processor-spring:2022.5' processor 'io.openapiprocessor:openapi-processor-spring:2022.5'
apiPath "$projectDir/src/main/resources/api-definition/hs-booking/hs-booking.yaml" apiPath "$projectDir/src/main/resources/api-definition/hs-booking/hs-booking.yaml"
mapping "$projectDir/src/main/resources/api-definition/hs-booking/api-mappings.yaml" mapping "$projectDir/src/main/resources/api-definition/hs-booking/api-mappings.yaml"
targetDir "$buildDir/generated/sources/openapi-javax" targetDir layout.buildDirectory.dir("generated/sources/openapi-javax")
showWarnings true showWarnings true
openApiNullable true openApiNullable true
} }
@ -174,7 +174,7 @@ openapiProcessor {
processor 'io.openapiprocessor:openapi-processor-spring:2022.5' processor 'io.openapiprocessor:openapi-processor-spring:2022.5'
apiPath "$projectDir/src/main/resources/api-definition/hs-hosting/hs-hosting.yaml" apiPath "$projectDir/src/main/resources/api-definition/hs-hosting/hs-hosting.yaml"
mapping "$projectDir/src/main/resources/api-definition/hs-hosting/api-mappings.yaml" mapping "$projectDir/src/main/resources/api-definition/hs-hosting/api-mappings.yaml"
targetDir "$buildDir/generated/sources/openapi-javax" targetDir layout.buildDirectory.dir("generated/sources/openapi-javax")
showWarnings true showWarnings true
openApiNullable true openApiNullable true
} }
@ -201,11 +201,11 @@ project.tasks.compileJava.dependsOn processSpring
// TODO.impl: Upgrade to io.openapiprocessor.openapi-processor >= 2024.2 // TODO.impl: Upgrade to io.openapiprocessor.openapi-processor >= 2024.2
// and use either `bean-validation: true` in api-mapping.yaml or `useSpringBoot3 true` (not sure where exactly). // and use either `bean-validation: true` in api-mapping.yaml or `useSpringBoot3 true` (not sure where exactly).
task openApiGenerate(type: Copy) { task openApiGenerate(type: Copy) {
from "$buildDir/generated/sources/openapi-javax" from layout.buildDirectory.dir("generated/sources/openapi-javax")
into "$buildDir/generated/sources/openapi" into layout.buildDirectory.dir("generated/sources/openapi")
filter { line -> line.replaceAll('javax', 'jakarta') } filter { line -> line.replaceAll('javax', 'jakarta') }
} }
compileJava.source "$buildDir/generated/sources/openapi" compileJava.source layout.buildDirectory.dir("generated/sources/openapi")
compileJava.dependsOn openApiGenerate compileJava.dependsOn openApiGenerate
openApiGenerate.dependsOn processSpring openApiGenerate.dependsOn processSpring