sort groups under files

This commit is contained in:
Yonas Kolb
2018-07-24 22:45:52 +10:00
parent e915fdf421
commit 91d2177f84
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -9,9 +9,9 @@ extension PBXFileElement {
public var sortOrder: Int {
if type(of: self).isa == "PBXGroup" {
return 0
} else {
return 1
} else {
return 0
}
}
}
@@ -551,6 +551,11 @@
G_8448771205358 = {
isa = PBXGroup;
children = (
FR_479281060337 /* Folder */,
FR_815403394914 /* Headers */,
FR_232605427418 /* Mintfile */,
FR_257073931060 /* ResourceFolder */,
FR_775316160345 /* SomeFile */,
G_8252321105004 /* App */,
G_7831228999101 /* App_iOS_Tests */,
G_1235039993875 /* App_iOS_UITests */,
@@ -564,11 +569,6 @@
G_7189434949822 /* Resources */,
G_6651250437419 /* StandaloneFiles */,
G_3997550084026 /* StaticLibrary_ObjC */,
FR_479281060337 /* Folder */,
FR_815403394914 /* Headers */,
FR_232605427418 /* Mintfile */,
FR_257073931060 /* ResourceFolder */,
FR_775316160345 /* SomeFile */,
G_1952740716080 /* Frameworks */,
G_8620238527590 /* Products */,
);
@@ -501,13 +501,13 @@ class SourceGeneratorTests: XCTestCase {
let group = pbxProj.objects.group(named: "Sources", inGroup: try pbxProj.getMainGroup())!.object
let names = group.children.compactMap { pbxProj.objects.getFileElement(reference: $0)?.nameOrPath }
try expect(names) == [
"group",
"group2",
"1file.a",
"10file.a",
"file.swift",
"file2.swift",
"file3.swift",
"group",
"group2",
]
}
}