一、全局强制使用某个版本的依赖库
configurations.all {
resolutionStrategy.cacheChangingModulesFor 0, 'seconds'
resolutionStrategy.cacheDynamicVersionsFor 0, 'seconds'
resolutionStrategy.force 'androidx.appcompat:appcompat:1.1.0'
resolutionStrategy.force 'com.google.code.gson:gson:2.8.5'
resolutionStrategy {
force 'com.squareup.okhttp3:okhttp:3.12.0'
force "com.squareup.okhttp3:logging-interceptor:3.12.0"
}
}
网友评论