0

Say I have a project ProjectA with a compile dependency on core. And core depends on deepcore. Thus, ProjectA has a transitive dependency on deepcore.

So, build script for ProjectA has this

dependencies {
    compile "com.something:core:1.0.0"
}

And build script for core has this

dependencies {
    compile "com.something:deep-core:1.0.0"
}

Now, there is a class CoreService defined in both core and deepcore with the same package structure. And I am using that class from my ProjectA, which implementation will it use? How do configure my dependency so that I am using the version from core?

Arif Hossain
  • 606
  • 6
  • 9
  • If you think this is not a valid question, could you please point me to related documentation where dependency ordering for gradle is explained. Thank you. – Arif Hossain Feb 18 '16 at 21:33

1 Answers1

0

This should do what you are looking for.

dependencies {
    compile "com.something:deep-core:1.0.0" {
      exclude group: 'com.unwanted', module: 'unwanted'
    }
}
Michael Hobbs
  • 1,663
  • 1
  • 15
  • 26