In my gradle.build, I have various library that perform the same exclusion as below
androidTestCompile ('com.android.support.test:runner:0.5') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile ('com.android.support.test:rules:0.5') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2') {
exclude group: 'com.android.support', module: 'support-annotations'
}
androidTestCompile ('com.android.support.test.espresso:espresso-web:2.2.2') {
exclude group: 'com.android.support', module: 'support-annotations'
}
Obviously, everyone is using the same exclude
exclude group: 'com.android.support', module: 'support-annotations'
}
Is there a way, that I need only to write the exclude once, and apply to all libraries (at least those that I am interested to perform exclusion)?