Utility to check hard coded version

Hi, We have certain common libraries which are being used by several projects. The common libraries are published with version $commonVersion and this is defined in the init.gradle of all projects using the common libraries.

Some of the projects , while defining the compile time dependencies , have not used the property $commonVersion. Instead they have hard coded the version as “1.0.0”

Is there any means by which we can verify whether the version is hard coded in the compile dependencies or using the property defined in init.gradle ?

I presume resolution strategy can force version but since the common libraries are using different naming conventions ( groupd Id , Artefact Id ) - I would like to know if there is any means by which I can trap the hard coded version and break the build ?