gradle 排除依赖
How to exclude Gradle dependencies
指定依赖下的依赖排除
// 指定依赖下的依赖排除
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation('us.codecraft:webmagic-core:0.7.3') {
exclude group: 'org.slf4j.slf4j-log4j12', module: '1.7.32'
}
}
配置依赖排除规则,排除所有该依赖
// 配置依赖排除规则,排除所有该依赖
configurations.implementation {
exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-mail'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'us.codecraft:webmagic-core:0.7.3'
}