This commit is contained in:
Yonas Kolb
2017-11-15 16:59:29 +01:00
parent b3908a8b85
commit b2a2a01da7
2 changed files with 15 additions and 2 deletions
+13
View File
@@ -65,6 +65,19 @@ class SourceGenerator {
return SourceFile(path: path, fileReference: fileReference, buildFile: buildFile, buildPhase: buildPhase)
}
func getContainedFileReference(path: Path) -> String {
let createIntermediateGroups = spec.options.createIntermediateGroups
let parentPath = path.parent()
let fileReference = getFileReference(path: path, inPath: parentPath)
let parentGroup = getGroup(path: parentPath, mergingChildren: [fileReference], createIntermediateGroups: createIntermediateGroups, isBaseGroup: true)
if createIntermediateGroups {
createIntermediaGroups(for: parentGroup.reference, at: parentPath)
}
return fileReference
}
func getFileReference(path: Path, inPath: Path, name: String? = nil, sourceTree: PBXSourceTree = .group) -> String {
if let fileReference = fileReferencesByPath[path] {
return fileReference