I have a project child with build.gradle as follows.
dependencies{
compile 'com.google.guava:guava:17'
}
I've another project called parent with build.gradle as follows.
dependencies{
compile project(':child')
compile 'com.google.guava:guava:23'
}
Now my question is which version will child project use at runtime? I know Gradle dependency tree shows 17 -> 23
. But does that mean child will also use a newer version of guava? What if I wanted to use guava:23
in parent but it has some class missing that child uses?
What if I don't control child and it's included as an external dependency in parent like:
compile 'xxx:child:1.0'
Does that mean I'll never be able to upgrade my guava version until child does?