Skip to content
Sharp

Build Tools · interview question

Why do teams use a locking mechanism for dependencies in a Gradle project in production code?

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

Correct answer

B. To ensure reproducible builds by fixing dependency versions

Why

The primary purpose of using a locking mechanism in Gradle is to ensure reproducible builds by locking dependency versions. This prevents unexpected changes in dependency versions that could otherwise occur due to changes in external repositories.

Test yourself on Build Tools

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

Start free test
All Build Tools questions →