1、去掉某个依赖的下的依赖
implementation("com.haha.service:hybrid:1.0") {
exclude group: 'com.haha.base', module: 'common'
}
2、组件化开发本地调试,强制使用本地module代码(使用到本地代码的module都要加上以下配置)
configurations.all {
resolutionStrategy.dependencySubstitution {
substitute module('com.haha.base:common') with project(':common')
}
}
3、强制某个依赖使用特定版本
//在configuration 级别指定,直接指定版本
configurations.all {
resolutionStrategy.force 'io.reactivex.rxjava2:rxjava:2.1.6'
}
4、去掉某个冲突依赖(当依赖名不一样,但是代码一样,很有用)
configurations.implementation {
exclude group:'com.haha.service',module:'push'
}