Skip to content
Sharp

Build Tools · interview question

What happens if two dependencies bring in different versions of the same transitive dependency in Gradle?

Multiple choiceMediumchapter-10-curatedpremiumbuild-toolsdependency-management
Choose one answer
Answer and explanation

Correct answer

D. Gradle uses the latest version

Why

In Gradle, if two dependencies bring in different versions of the same transitive dependency, Gradle resolves the conflict by using the latest version. This behavior can be configured if needed.

Test yourself on Build Tools

A free test with instant, explained results. No account needed.

Start free test
All Build Tools questions →