Prevent gradle to override transitive dependency for certain module

android

(Reza Stallone Asmuruf) #1

I have dependency tree as follows
±-- com.vincent.filepicker:MultiTypeFilePicker:1.0.5
| ±-- com.github.bumptech.glide:glide:3.7.0 -> 4.3.1
±-- com.github.bumptech.glide:glide:4.3.1 (*)

I do not wish glide 4.3.1 to override glide.3.7.0 used by MultiTypeFilePicker, can anyone help me out to achieve this ?


(James Justinic) #2

By default, Gradle is going to pick the newest of the versions that you depend on. You can influence what version is chosen, but not simply pick the version that is a transitive dependency of a particular dependency (without some complex queries and logic). You can simply force 3.7.0 with a ResolutionStrategy, but if your dependency tree is that simple, it seems like you should just not be depending on 4.3.1 yourself, if that’s not the version you require.