This commit is contained in:
Михаил Капелько
2023-12-28 13:33:48 +03:00
父節點 16026a7b47
當前提交 d893364ff4
共有 93 個文件被更改,包括 2130 次插入0 次删除

查看文件

@@ -0,0 +1,16 @@
def generateImports(c):
fileName = f"{c.src}/../{c.module}.podspec"
# Для сборного модуля используем путь к корневому podspec.
if c.path != c.module:
parent = c.path.split("/")[0]
fileName = fileName.replace(f"{c.module}/src/../{c.module}", parent)
lines = c.readFile(fileName)
items = ["Combine", "Foundation", "UIKit"]
prefix = "s.dependency '"
for ln in lines:
if ln.startswith(prefix):
name = ln[len(prefix):-1]
items.append(name)
c.imports = "import " + "\nimport ".join(sorted(items))