diff --git a/Sources/XcodeGenKit/SourceGenerator.swift b/Sources/XcodeGenKit/SourceGenerator.swift index 4d1456fa..6bddb3e0 100644 --- a/Sources/XcodeGenKit/SourceGenerator.swift +++ b/Sources/XcodeGenKit/SourceGenerator.swift @@ -241,7 +241,7 @@ class SourceGenerator { return [$0] } - return (try? $0.recursiveChildren().filter { $0.isFile }) ?? [] + return (try? $0.recursiveChildren()) ?? [] } .reduce([], +) } diff --git a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift index 4cbdcba2..106f2f0d 100644 --- a/Tests/XcodeGenKitTests/SourceGeneratorTests.swift +++ b/Tests/XcodeGenKitTests/SourceGeneratorTests.swift @@ -206,6 +206,10 @@ class SourceGeneratorTests: XCTestCase { - a.ignored - project.xcodeproj: - project.pbxproj + - a.playground: + - Sources: + - a.swift + - Resources """ try createDirectories(directories) @@ -220,6 +224,7 @@ class SourceGeneratorTests: XCTestCase { "ignore.file", "*.ignored", "*.xcodeproj", + "*.playground", // not supported // "**/*.ignored", ] @@ -248,6 +253,10 @@ class SourceGeneratorTests: XCTestCase { try pbxProj.expectFileMissing(paths: ["Sources", "a.ignored"]) try pbxProj.expectFileMissing(paths: ["Sources", "ignore.file"]) try pbxProj.expectFileMissing(paths: ["Sources", "project.xcodeproj"]) + try pbxProj.expectFileMissing(paths: ["Sources", "a.playground"]) + // not supported: "**/*.ignored" + // try pbxProj.expectFileMissing(paths: ["Sources", "A", "a.ignored"]) + // try pbxProj.expectFileMissing(paths: ["Sources", "A", "B", "b.ignored"]) } $0.it("generates file sources") {