How to override a parent dependency a local dependency (not in repository)?

Hello Gradle users,

I have a module, called A, that has a third party dependency with a specific version:

dependencies {

compile ‘XXX:yyyy:1.0’ }

Then I have other modules, called B, D, E, etc that depend on A which in turn use the module XXX:yyyy:1.0. The problem is that module ‘XXX:yyyy:1.0’ is not available on the testing machine and instead I want to use XXX:yyyy:2.0.

It is possible to override XXX:yyyy:1.0 with XXX:yyyy:2.0 only on module B?