Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Don't consider references to catalogs in buildfiles
We do support some bare version replacements in build files, for example, ``` val helmVersion = "1.6.0" id("org.unbroken-dome.helm") version helmVersion apply false ``` What the code use to do was checking whether the version parsed was all "word characters" or not. If all word characters, then it's considered a property name, a value for the property is looked up, and if a value cannot be found, then the dependency is ignored. If not all word characters, then it's considered a version number, and the dependency is only ignored if the version number is not valid. In this case, `libs.versions.<ref>` includes dots, which are not word characters, so it does not match the regexp to be considered a property reference. As a consequence, it's considered a version number, and accepted as a dependency because `libs.versions.<ref>` is actually a valid maven version number. I could've tweaked the regexp to accept dots for property names, but I think it's a better criteria to check whether to matched value is quoted. If it is, it's a version number, otherwise it's a property. So I implemented that.
- Loading branch information