mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-20 17:17:33 +03:00
Merge pull request #442 from yonaskolb/intent_definition
Add .intentdefinition to sources by default
This commit is contained in:
commit
d1313ef0d9
@ -5,6 +5,7 @@
|
||||
#### Fixed
|
||||
- Fixed XPC Service package type [#435](https://github.com/yonaskolb/XcodeGen/pull/435) @alvarhansen
|
||||
- Fixed phase ordering for modulemap and static libary header Copy File phases. [402](https://github.com/yonaskolb/XcodeGen/pull/402) @brentleyjones
|
||||
- Add `.intentdefinition` files to sources build phase instead of resources [#442](https://github.com/yonaskolb/XcodeGen/pull/442) @yonaskolb
|
||||
|
||||
#### Changed
|
||||
- Changed spelling of build phases to **preBuildPhase** and **postBuildPhase**. [402](https://github.com/yonaskolb/XcodeGen/pull/402) @brentleyjones
|
||||
|
@ -183,8 +183,25 @@ class SourceGenerator {
|
||||
}
|
||||
if let fileExtension = path.extension {
|
||||
switch fileExtension {
|
||||
case "swift", "m", "mm", "cpp", "c", "cc", "S", "xcdatamodeld", "metal": return .sources
|
||||
case "h", "hh", "hpp", "ipp", "tpp", "hxx", "def": return .headers
|
||||
case "swift",
|
||||
"m",
|
||||
"mm",
|
||||
"cpp",
|
||||
"c",
|
||||
"cc",
|
||||
"S",
|
||||
"xcdatamodeld",
|
||||
"intentdefinition",
|
||||
"metal":
|
||||
return .sources
|
||||
case "h",
|
||||
"hh",
|
||||
"hpp",
|
||||
"ipp",
|
||||
"tpp",
|
||||
"hxx",
|
||||
"def":
|
||||
return .headers
|
||||
case "modulemap":
|
||||
guard targetType == .staticLibrary else { return nil }
|
||||
return .copyFiles(TargetSource.BuildPhase.CopyFilesSettings(
|
||||
@ -192,10 +209,18 @@ class SourceGenerator {
|
||||
subpath: "include/$(PRODUCT_NAME)",
|
||||
phaseOrder: .preCompile
|
||||
))
|
||||
case "framework": return .frameworks
|
||||
case "xpc": return .copyFiles(.xpcServices)
|
||||
case "xcconfig", "entitlements", "gpx", "lproj", "apns": return nil
|
||||
default: return .resources
|
||||
case "framework":
|
||||
return .frameworks
|
||||
case "xpc":
|
||||
return .copyFiles(.xpcServices)
|
||||
case "xcconfig",
|
||||
"entitlements",
|
||||
"gpx",
|
||||
"lproj",
|
||||
"apns":
|
||||
return nil
|
||||
default:
|
||||
return .resources
|
||||
}
|
||||
}
|
||||
return nil
|
||||
|
@ -436,6 +436,7 @@ class SourceGeneratorTests: XCTestCase {
|
||||
- file.xcassets
|
||||
- file.metal
|
||||
- Info.plist
|
||||
- Intent.intentdefinition
|
||||
"""
|
||||
try createDirectories(directories)
|
||||
|
||||
@ -483,6 +484,7 @@ class SourceGeneratorTests: XCTestCase {
|
||||
try pbxProj.expectFile(paths: ["C", "file.123"], buildPhase: .resources)
|
||||
try pbxProj.expectFile(paths: ["C", "Info.plist"], buildPhase: .none)
|
||||
try pbxProj.expectFile(paths: ["C", "file.metal"], buildPhase: .sources)
|
||||
try pbxProj.expectFile(paths: ["C", "Intent.intentdefinition"], buildPhase: .sources)
|
||||
}
|
||||
|
||||
$0.it("duplicate TargetSource is included once in sources build phase") {
|
||||
|
Loading…
Reference in New Issue
Block a user