// Runtime JAR files in the classpath should have the same version.
configurations.all {
resolutionStrategy.eachDependency { DependencyResolveDetails details ->
def kotlinVersion = "1.6.0"
def requested = details.requested
if (requested.group == 'org.jetbrains.kotlin') {
List<String> list = ['kotlin-stdlib', 'kotlin-stdlib-jdk7', 'kotlin-stdlib-jdk8', 'kotlin-stdlib-common']
if (list.contains(requested.name)) { details.useVersion kotlinVersion }
}
}
}
w: Some runtime JAR files in the classpath have an incompatible version. Consider removing them from the classpath
w: Runtime JAR files in the classpath should have the same version. These files were found in the classpath:
// this one defines it via rootProject e.g. `gradle.properties`
// change as needed
val kotlinVersion: String by rootProject
configurations.all {
resolutionStrategy {
force(
"org.jetbrains.kotlin:kotlin-stdlib:${kotlinVersion}",
"org.jetbrains.kotlin:kotlin-stdlib-common:${kotlinVersion}",
"org.jetbrains.kotlin:kotlin-reflect:${kotlinVersion}",
)
}
}