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