File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ public class CacheFile {
1010
1111 guard #available( OSX 10 . 13 , * ) else { return nil }
1212
13- let files = Set ( project. allFiles )
13+ let files = Set ( project. allTrackedFiles )
1414 . map { ( ( try ? $0. relativePath ( from: project. basePath) ) ?? $0) . string }
1515 . sorted { $0. localizedStandardCompare ( $1) == . orderedAscending }
1616 . joined ( separator: " \n " )
Original file line number Diff line number Diff line change @@ -252,7 +252,7 @@ extension Project: PathContainer {
252252
253253extension Project {
254254
255- public var allFiles : [ Path ] {
255+ public var allTrackedFiles : [ Path ] {
256256 var files : [ Path ] = [ ]
257257 files. append ( contentsOf: configFilePaths)
258258 for fileGroup in fileGroups {
@@ -270,15 +270,31 @@ extension Project {
270270 files. append ( contentsOf: target. configFilePaths)
271271 for source in target. sources {
272272 let sourcePath = basePath + source. path
273- let sourceChildren = ( try ? sourcePath. recursiveChildren ( ) ) ?? [ ]
274- files. append ( contentsOf: sourceChildren)
273+
274+ let type = source. type ?? options. defaultSourceDirectoryType ?? . group
275+ if type. projectTracksChildren {
276+ let sourceChildren = ( try ? sourcePath. recursiveChildren ( ) ) ?? [ ]
277+ files. append ( contentsOf: sourceChildren)
278+ }
275279 files. append ( sourcePath)
276280 }
277281 }
278282 return files
279283 }
280284}
281285
286+ extension SourceType {
287+
288+ var projectTracksChildren : Bool {
289+ switch self {
290+ case . file: false
291+ case . folder: false
292+ case . group: true
293+ case . syncedFolder: false
294+ }
295+ }
296+ }
297+
282298extension BuildSettingsContainer {
283299
284300 fileprivate var configFilePaths : [ Path ] {
You can’t perform that action at this time.
0 commit comments