add support for localPackages

This commit is contained in:
yonaskolb
2019-09-27 21:36:07 +10:00
parent 41453595cc
commit e9193cfb29
12 changed files with 138 additions and 3 deletions
@@ -48,6 +48,12 @@ public class PBXProjGenerator {
try sourceGenerator.getFileGroups(path: group)
}
let localPackages = Set(project.localPackages)
for package in localPackages {
let path = project.basePath + Path(package).normalize()
sourceGenerator.createLocalPackage(path: path)
}
let buildConfigs: [XCBuildConfiguration] = project.configs.map { config in
let buildSettings = project.getProjectBuildSettings(config: config)
var baseConfiguration: PBXFileReference?
+12
View File
@@ -41,6 +41,18 @@ class SourceGenerator {
return object
}
func createLocalPackage(path: Path) {
let fileReference = addObject(
PBXFileReference(
sourceTree: .absolute,
name: path.lastComponent,
lastKnownFileType: "folder",
path: path.string
)
)
rootGroups.insert(fileReference)
}
func getAllSourceFiles(targetType: PBXProductType, sources: [TargetSource]) throws -> [SourceFile] {
return try sources.flatMap { try getSourceFiles(targetType: targetType, targetSource: $0, path: project.basePath + $0.path) }
}