This message was deleted.
# community-support
s
This message was deleted.
v
For a particular dependency, just use a forced version if you are not in the scope of a library. If you want it for a whole lot of dependencies like in that example it is probably better to just depend on the respective BOM or if none exists, create a virtual platform to align the versions as described at https://docs.gradle.org/current/userguide/dependency_version_alignment.html
❤️ 1
m
i'd like to ensure same kotlin version there are known issue with different versions for kotlin-stdlib and kotlin-reflect, which I try to avoid the following way:
Copy code
root build.gradle


configurations.all {

resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def kotlinVersion = libs.versions.version.kotlin.stdlib
        def requested = details.requested
        if (details.requested.group == 'org.jetbrains.kotlin') {
            List<String> list = ['kotlin-stdlib', 'kotlin-stdlib-jdk7', 'kotlin-stdlib-jdk8', 'kotlin-stdlib-common, kotlin-reflect']
            if (list.contains(requested.name)) { details.useVersion kotlinVersion }
        }
    }

}
the question - is that well enough or there are something "bad" and nobody does like that anymore?
v
Just as I said, use the Kotlin BOM to align the versions and a forced version to ensure a specific version if you are not in a library project.
❤️ 1