Now I am using this code to force version in Gradle 6.0.1:
configurations.all { resolutionStrategy { eachDependency { DependencyResol