1.直接在configuration中排除
代码语言:javascript复制configurations {
compile.exclude module: 'commons'
all*.exclude group: 'org.gradle.test.excludes', module: 'reports'
}
2.在具体的某个dependency中排除
代码语言:javascript复制dependencies {
compile("org.gradle.test.excludes:api:1.0") {
exclude module: 'shared'
}
}