gradle 排除依赖


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


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM