I am trying to remove the transitive dependencies from my Android project and for some reason exclude
is not working when i try to remove a dependency from my particular dependency.
For example i want to remove support-annotations
from my project
if i use
configurations {
all*.exclude group: 'com.android.support', module:'support-annotations'
}
The dependency gets excluded and from the dependency tree. i can see the dependency tree by using ./gradlew app:dependencies
But if i use
compile('com.android.support:support-v4:23.4.0')
{
exclude group: 'com.android.support', module:'support-annotations'
}
Then i still see the dependency in the dependency tree.
So my question is that why is it not working when i try to remove the dependency from a particular dependency ?
Update 1:
Also can anyone tell me what does the star
(*) symbol next to dependency in the tree represent ?
Update 2
I am also using Fresco I tried the same thing with Fresco and exclude
rule seems to work for it
Dependency Tree of Fresco
Dependency Tree when i exclude imagepipeline-base
in Fresco
compile("com.facebook.fresco:fresco:0.9.0")
{
exclude group: 'com.facebook.fresco', module: 'imagepipeline-base'
}
As you can see the imagepipeline-base
dependency gets excluded. So i don't know why this doesn't work for Android Support Annotations transitive dependency