1. 程式人生 > >gradle 排除jar包依賴

gradle 排除jar包依賴

1.直接在configuration中排除 
configurations {
    compile.exclude module: 'commons'
    all*.exclude group: 'org.gradle.test.excludes', module: 'reports'
}

2.在具體的某個dependency中排除
dependencies {
    compile("org.gradle.test.excludes:api:1.0") {
        exclude module: 'shared'
    }
}
---------------------