来源文章: gradle 排除jar包依赖
1.直接在configuration中排除
configurations {
all*.exclude group: 'org.slf4j', module: 'slf4j-log4j12'
}
2,在具体的某个dependency中排除
dependencies {
compile("org.gradle.test.excludes:api:1.0") {
exclude module: 'shared'
}
}