palantir/gradle-consistent-versions

checkUnusedConstraints fails before verifyLocks fails, obscuring root cause of errors

gatesn opened this issue · 0 comments

What happened?

checkUnusedConstraints task was failing in CI even though it was succeeding locally.

What did you want to happen?

The root cause was that I hadn't configured the username/password for my Maven repo. This wasn't obvious from the checkUnusedConstraints failure (claiming the pin in versions.props was unused), but was obvious from the failure of verifyLocks (claiming username should not be null).

I think there should be a task dependency from checkUnusedConstraints onto verifyLocks, ensuring that the resolution succeeds before checking for unused things.