I can't exclude a guava module in a build.gradle file using "exclude".
With this dependency block:
dependencies {
...
compile(group: 'com.google.api-client', name: 'google-api-client', version: '1.19.0') {
exclude(group: 'com.google.guava', module: 'guava-jdk5') // !!! Doesn't work!!!
...
}
...
}
I get the dependency tree below. Note that guava-jdk5 is not excluded.
+--- com.google.api-client:google-api-client:1.19.0
| +--- com.google.oauth-client:google-oauth-client:1.19.0
| | +--- com.google.http-client:google-http-client:1.19.0
| | | ...
| | \--- com.google.code.findbugs:jsr305:1.3.9
| ...
| \--- com.google.guava:guava-jdk5:13.0
...
Notice that the last line still includes the guava module, it has not been excluded. Why? How to exclude it?