fix files not being added to root properly

This commit is contained in:
Yonas Kolb 2018-04-11 23:27:33 +10:00
parent 89d3bfcf91
commit c0df295366
4 changed files with 15 additions and 4 deletions

View File

@ -440,11 +440,17 @@ class SourceGenerator {
let sourceFile = generateSourceFile(targetSource: targetSource, path: path)
let parentGroup = getGroup(path: parentPath, mergingChildren: [fileReference], createIntermediateGroups: createIntermediateGroups, isBaseGroup: true)
sourcePath = parentPath
if parentPath == spec.basePath {
sourcePath = path
sourceReference = fileReference
rootGroups.insert(fileReference)
} else {
let parentGroup = getGroup(path: parentPath, mergingChildren: [fileReference], createIntermediateGroups: createIntermediateGroups, isBaseGroup: true)
sourcePath = parentPath
sourceReference = parentGroup.reference
}
sourceFiles.append(sourceFile)
sourceReference = parentGroup.reference
case .group:
let (groupSourceFiles, groups) = try getGroupSources(targetSource: targetSource, path: path, isBaseGroup: true)
let group = groups.first!

View File

View File

@ -141,6 +141,7 @@
FR_172952167809 /* FrameworkFile.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FrameworkFile.swift; sourceTree = "<group>"; };
FR_183521624014 /* MyFramework.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MyFramework.h; sourceTree = "<group>"; };
FR_196911129660 /* MoreUnder.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoreUnder.swift; sourceTree = "<group>"; };
FR_232605427418 /* Mintfile */ = {isa = PBXFileReference; path = Mintfile; sourceTree = "<group>"; };
FR_238161558082 /* MyBundle.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; path = MyBundle.bundle; sourceTree = "<group>"; };
FR_247808626608 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
FR_256263906698 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
@ -414,6 +415,7 @@
G_6651250437419 /* StandaloneFiles */,
FR_479281060337 /* Folder */,
FR_815403394914 /* Headers */,
FR_232605427418 /* Mintfile */,
FR_257073931060 /* ResourceFolder */,
);
indentWidth = 2;

View File

@ -42,6 +42,9 @@ targets:
- path: Folder
type: folder
buildPhase: none
- path: Mintfile
type: file
buildPhase: none
settings:
INFOPLIST_FILE: App_iOS/Info.plist
PRODUCT_BUNDLE_IDENTIFIER: com.project.app