- 传递(transitive)
- 排除(exclude)
- 强制(force)
- 动态版本(+)
implementation('com.xxx:xxx:1.0.0@aar') {
transitive = true
changing = true
force = true
exclude group: 'com.xxx', module: 'xxx'
}

强制使用指定版本号
configurations.all {
resolutionStrategy {
force 'com.github.bumptech.glide:glide:4.2.0'
}
}
Gradle依赖分析
./gradlew ${module_path}:dependencies

+ - | \ 符号:只是用来绘制树。
(*)符号:表示重复依赖。
-> 符号:表示版本冲突中时最高版本。
参考资料:https://blog.youkuaiyun.com/pkaq_/article/details/53906668
本文详细介绍了Gradle中依赖管理的具体方法,包括如何配置依赖项的传递性、排除特定依赖、强制使用指定版本等高级技巧,并提供了依赖分析的命令行工具使用说明。
1034





