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'
}