一种压缩它的方法,不包括
mockito-core
:
testCompile ("org.mockito:mockito-core:${versions.mockito}") {
exclude group: 'org.hamcrest', module: 'hamcrest-core'
}
['powermock-api-mockito-common',
'powermock-api-mockito',
'powermock-core',
'powermock-module-junit4',
'powermock-module-junit4-common',
'powermock-api-support',
'powermock-api-easymock',
'powermock-module-javaagent',
'powermock-module-junit4-rule-agent'].each {
testCompile ("org.powermock:${it}:${versions.powermock}") {
exclude group: 'org.mockito', module: 'mockito-core'
}
}
此外,TESTRONTIME
莫克托核心
是无用的
testRuntime
extends
testCompile