Skip to content
Sharp

Build Tools · interview question

In Gradle, how do you ensure a specific version of a library is used across all modules of a multi-module project?

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

Correct answer

B. Define the version in a central build.gradle file and apply it to all modules

Why

In a multi-module Gradle project, defining the library version in a central build.gradle file and applying it to all modules ensures consistency and simplifies version management across the entire project.

Test yourself on Build Tools

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

Start free test
All Build Tools questions →