From 9409187203cad49c5c18a718c58cf82c328014d7 Mon Sep 17 00:00:00 2001 From: Vadim Lazuk Date: Fri, 4 Dec 2026 18:46:46 +0300 Subject: [PATCH] fix: keep the published Kotlin metadata readable by Kotlin 2.2 consumers Since 3.2.1 the build inherits Spring Boot 4.2 and its Kotlin 2.4 compiler, so the published springdoc-openapi-starter-common jar advertises Kotlin metadata 2.4.0 and breaks compilation of any Kotlin 2.2 consumer (Spring Boot 4.0/4.1 apps) with 'Module was compiled with an incompatible version of Kotlin'. Pin apiVersion and languageVersion to 2.2 on the kotlin-maven-plugin of the only published module with Kotlin sources, so the emitted metadata stays at level 2.2.0 (as in 3.2.0) while the compiler itself continues to come from the managed Spring Boot version. Fixes #3458 Signed-off-by: Vadim Lazuk --- springdoc-openapi-starter-common/pom.xml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/springdoc-openapi-starter-common/pom.xml b/springdoc-openapi-starter-common/pom.xml index 212f5f700..d73dcf170 100644 --- a/springdoc-openapi-starter-common/pom.xml +++ b/springdoc-openapi-starter-common/pom.xml @@ -195,6 +195,12 @@ spring + + 2.2 + 2.2