How to exclude old version kotlin imported by Spring-boot dependencyManagement?


#1

I’m upgrading my project to spring-boot 2.1.2.RELEASE, using dependencyManagement below:

dependencyManagement {
imports {
mavenBom(“org.springframework.boot:spring-boot-dependencies:${springBootVersion}”)
}
}

Full maven pom file link: http://central.maven.org/maven2/org/springframework/boot/spring-boot-dependencies/2.1.2.RELEASE/spring-boot-dependencies-2.1.2.RELEASE.pom

The pom imported kotlin 1.2.71, while I want kotlin 1.3.10.
So this caused “Runtime JAR files in the classpath should have the same version”, both 1.2.71 and 1.3.10 exists.

I’d like to hear your people’s solution. Thanks in advance.


#2

Try:

ext[‘kotlin.version’] = “1.3.10”


#3

Seems working now. Thank you :slight_smile: