Fix checkDependencies.py, looks like gradle 9.6.1 surrounds the dependencies with '

This commit is contained in:
Benoit Marty
2026-07-17 16:38:41 +02:00
parent 7f27f4d697
commit 968d271f2c
+3 -3
View File
@@ -35,7 +35,7 @@ def checkThatModulesExist(dependencies):
line = line.split(" ")
for elem in line:
if ":" in elem:
modules.add(elem)
modules.add(elem.replace("'", ""))
for module in modules:
path = "." + module.replace(":", "/") + "/build.gradle.kts"
if not os.path.exists(path):
@@ -51,12 +51,12 @@ def checkThatThereIsNoTestDependency(dependencies):
currentProject = ""
for line in dependencies:
if line.startswith("+--- project "):
currentProject = line.split(" ")[2]
currentProject = line.split(" ")[2].replace("'", "")
else:
if ":test" in currentProject:
continue
else:
subProject = line.split(" ")[-1]
subProject = line.split(" ")[-1].replace("'", "")
if subProject.endswith(":test") or ":tests:" in subProject and "detekt-rules" not in subProject:
error = "Error: '" + currentProject + "' depends on the test project '" + subProject + "'\n"
error += " Please replace occurrence(s) of 'implementation(projects" + subProject.replace(":", ".") + ")'"