mirror of
https://github.com/yonaskolb/XcodeGen.git
synced 2024-09-11 12:56:03 +03:00
Support for swiftcrossimport
folders (#1317)
* Naive support for swiftcrossimport * Update SourceGenerator.swift * Add changelog entry * Update CHANGELOG.md * Add test fixture * Check-in generated diffs
This commit is contained in:
parent
9551979e54
commit
366981ba2e
@ -5,6 +5,7 @@
|
||||
### Changed
|
||||
|
||||
- Renamed build phase `Embed App Extensions` to `Embed Foundation Extensions` to fix Xcode 14 warning #1310 @casperriboe
|
||||
- Added support for `swiftcrossimport` folders. #1317 @Iron-Ham
|
||||
|
||||
### Fixed
|
||||
|
||||
|
@ -279,6 +279,13 @@ class SourceGenerator {
|
||||
subpath: "include/$(PRODUCT_NAME)",
|
||||
phaseOrder: .preCompile
|
||||
))
|
||||
case "swiftcrossimport":
|
||||
guard targetType == .framework else { return nil }
|
||||
return .copyFiles(BuildPhaseSpec.CopyFilesSettings(
|
||||
destination: .productsDirectory,
|
||||
subpath: "$(PRODUCT_NAME).framework/Modules",
|
||||
phaseOrder: .preCompile
|
||||
))
|
||||
default:
|
||||
return .resources
|
||||
}
|
||||
|
@ -59,6 +59,8 @@ extension Xcode {
|
||||
// cases that aren't handled (yet) in XcodeProj.
|
||||
case ("appex", .extensionKitExtension):
|
||||
return "wrapper.extensionkit-extension"
|
||||
case ("swiftcrossimport", _):
|
||||
return "wrapper.swiftcrossimport"
|
||||
default:
|
||||
// fallback to XcodeProj defaults
|
||||
return Xcode.filetype(extension: fileExtension)
|
||||
|
@ -0,0 +1,5 @@
|
||||
%YAML 1.2
|
||||
---
|
||||
version: 1
|
||||
modules:
|
||||
- name: _CrossOverlayFramework_Framework
|
@ -0,0 +1,6 @@
|
||||
import Foundation
|
||||
|
||||
public struct FrameworkStruct {
|
||||
|
||||
public init() {}
|
||||
}
|
24
Tests/Fixtures/TestProject/CrossOverlayFramework/Info.plist
Normal file
24
Tests/Fixtures/TestProject/CrossOverlayFramework/Info.plist
Normal file
@ -0,0 +1,24 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>$(PRODUCT_NAME)</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.2</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(CURRENT_PROJECT_VERSION)</string>
|
||||
<key>NSPrincipalClass</key>
|
||||
<string></string>
|
||||
</dict>
|
||||
</plist>
|
@ -0,0 +1,9 @@
|
||||
//
|
||||
// MyFramework.h
|
||||
// MyFramework
|
||||
//
|
||||
// Created by Yonas Kolb on 21/7/17.
|
||||
// Copyright © 2017 Yonas Kolb. All rights reserved.
|
||||
//
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -321,6 +321,14 @@ targets:
|
||||
- sdk: Platforms/iPhoneOS.platform/Developer/Library/Frameworks/XCTest.framework
|
||||
root: DEVELOPER_DIR
|
||||
|
||||
CrossOverlayFramework:
|
||||
type: framework
|
||||
platform: [iOS, tvOS, watchOS, macOS]
|
||||
sources:
|
||||
- path: CrossOverlayFramework
|
||||
excludes:
|
||||
- "*.xcodeproj"
|
||||
|
||||
App_iOS_Tests:
|
||||
type: bundle.unit-test
|
||||
platform: iOS
|
||||
|
Loading…
Reference in New Issue
Block a user