From be7fec8b04c74363c3d83702a7937c99511dfc08 Mon Sep 17 00:00:00 2001 From: Max Chuquimia Date: Wed, 1 Feb 2023 21:07:51 +1100 Subject: [PATCH] #17: Basic XCode Workspace support --- .../XcodeProjectAsDependencyManager.swift | 43 ++ .../PluginSupport/PluginSupport.swift | 32 ++ .../XCGrapherLib/ShellTasks/XCWorkspace.swift | 79 ++++ .../XCGrapherLib/ShellTasks/Xcodebuild.swift | 14 +- .../ShellTasks/XcodeprojTargets.swift | 32 ++ Sources/XCGrapherLib/XCGrapher.swift | 38 +- Sources/XCGrapherLib/XCGrapherOptions.swift | 19 +- Sources/xcgrapher/XCGrapherArguments.swift | 40 +- .../Framework1.xcodeproj/project.pbxproj | 344 ++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../Framework1/Framework1/Framework1.h | 18 + .../Framework1/Framework1/Something.swift | 9 + .../Project1.xcodeproj/project.pbxproj | 382 ++++++++++++++++++ .../xcshareddata/xcschemes/Project1.xcscheme | 78 ++++ .../AccentColor.colorset/Contents.json | 11 + .../AppIcon.appiconset/Contents.json | 13 + .../Project1/Assets.xcassets/Contents.json | 6 + .../Project1/Project1/ContentView.swift | 27 ++ .../Preview Assets.xcassets/Contents.json | 6 + .../Project1/Project1/Project1App.swift | 19 + .../SomeWorkspace/MyLibrary/.gitignore | 9 + .../xcshareddata/xcschemes/MyLibrary.xcscheme | 77 ++++ .../xcschemes/RandomTestScheme.xcscheme | 52 +++ .../SomeWorkspace/MyLibrary/Package.swift | 29 ++ .../SomeWorkspace/MyLibrary/README.md | 3 + .../Sources/MyLibrary/MyLibrary.swift | 9 + .../Tests/MyLibraryTests/MyLibraryTests.swift | 11 + .../contents.xcworkspacedata | 13 + .../xcshareddata/IDEWorkspaceChecks.plist | 8 + .../xcshareddata/swiftpm/Package.resolved | 14 + .../XCGrapherTests+SPM.swift | 3 +- .../XCGrapherTests+Xcodeproject.swift | 3 +- 33 files changed, 1425 insertions(+), 31 deletions(-) create mode 100644 Sources/XCGrapherLib/DependencyManagers/XcodeProjectAsDependencyManager.swift create mode 100644 Sources/XCGrapherLib/ShellTasks/XCWorkspace.swift create mode 100644 Sources/XCGrapherLib/ShellTasks/XcodeprojTargets.swift create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.pbxproj create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1/Framework1.h create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1/Something.swift create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1.xcodeproj/project.pbxproj create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1.xcodeproj/xcshareddata/xcschemes/Project1.xcscheme create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/AccentColor.colorset/Contents.json create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/Contents.json create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/ContentView.swift create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Preview Content/Preview Assets.xcassets/Contents.json create mode 100644 Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Project1App.swift create mode 100644 Tests/SampleProjects/SomeWorkspace/MyLibrary/.gitignore create mode 100644 Tests/SampleProjects/SomeWorkspace/MyLibrary/.swiftpm/xcode/xcshareddata/xcschemes/MyLibrary.xcscheme create mode 100644 Tests/SampleProjects/SomeWorkspace/MyLibrary/.swiftpm/xcode/xcshareddata/xcschemes/RandomTestScheme.xcscheme create mode 100644 Tests/SampleProjects/SomeWorkspace/MyLibrary/Package.swift create mode 100644 Tests/SampleProjects/SomeWorkspace/MyLibrary/README.md create mode 100644 Tests/SampleProjects/SomeWorkspace/MyLibrary/Sources/MyLibrary/MyLibrary.swift create mode 100644 Tests/SampleProjects/SomeWorkspace/MyLibrary/Tests/MyLibraryTests/MyLibraryTests.swift create mode 100644 Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/contents.xcworkspacedata create mode 100644 Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist create mode 100644 Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved diff --git a/Sources/XCGrapherLib/DependencyManagers/XcodeProjectAsDependencyManager.swift b/Sources/XCGrapherLib/DependencyManagers/XcodeProjectAsDependencyManager.swift new file mode 100644 index 0000000..ad64c7c --- /dev/null +++ b/Sources/XCGrapherLib/DependencyManagers/XcodeProjectAsDependencyManager.swift @@ -0,0 +1,43 @@ +// +// XcodeProjectAsDependencyManager.swift +// +// +// Created by Max Chuquimia on 1/2/2023. +// + +import Foundation +import XCGrapherPluginSupport + +struct XcodeProjectAsDependencyManager { + + let allCustomFrameworks: [String: [FileManager.Path]] + + init(projects: [FileManager.Path]) throws { + var allCustomFrameworks: [String: [FileManager.Path]] = [:] + for project in projects { + let targets = try XcodeprojTargets(projectFile: project).targetList() + for target in targets { + allCustomFrameworks[target] = try Xcodeproj(projectFile: project, target: target).compileSourcesList() + } + } + self.allCustomFrameworks = allCustomFrameworks + } + +} + +extension XcodeProjectAsDependencyManager: DependencyManager { + + var pluginModuleType: XCGrapherImport.ModuleType { + .target + } + + func isManaging(module: String) -> Bool { + allCustomFrameworks.keys.contains(module) + } + + func dependencies(of module: String) -> [String] { + guard let files = allCustomFrameworks[module] else { return [] } + return ImportFinder(fileList: files).allImportedModules() + } + +} diff --git a/Sources/XCGrapherLib/PluginSupport/PluginSupport.swift b/Sources/XCGrapherLib/PluginSupport/PluginSupport.swift index 5950347..e984136 100644 --- a/Sources/XCGrapherLib/PluginSupport/PluginSupport.swift +++ b/Sources/XCGrapherLib/PluginSupport/PluginSupport.swift @@ -8,6 +8,7 @@ class PluginSupport { var swiftPackageManager: SwiftPackageManager? var cocoapodsManager: CocoapodsManager? var nativeManager: NativeDependencyManager? + var customProjectManager: XcodeProjectAsDependencyManager? var unknownManager: UnmanagedDependencyManager? init(pluginPath: FileManager.Path) throws { @@ -62,6 +63,12 @@ class PluginSupport { nodes.append(contentsOf: _nodes) } + // MARK: - Custom + else if customProjectManager?.isManaging(module: module) == true { + var previouslyEncounteredModules: Set = [] + try recurseCustomXcodeProjects(from: module, importedBy: target, importerType: .target, building: &nodes, skipping: &previouslyEncounteredModules) + } + // Weird unknown cases else if unknownManager?.isManaging(module: module) == true { let _nodes = try plugin_process(library: XCGrapherImport(moduleName: module, importerName: target, moduleType: .other, importerType: .target)) @@ -143,6 +150,31 @@ private extension PluginSupport { } } + func recurseCustomXcodeProjects(from module: String, importedBy importer: String, importerType: XCGrapherImport.ModuleType, building nodeList: inout [Any], skipping modulesToSkip: inout Set) throws { + let _nodes = try plugin_process(library: XCGrapherImport(moduleName: module, importerName: importer, moduleType: .other, importerType: importerType)) + nodeList.append(contentsOf: _nodes) + + guard !modulesToSkip.contains(module) else { return } + modulesToSkip.insert(module) + + guard customProjectManager?.isManaging(module: module) == true else { return } + + for importedName in customProjectManager?.dependencies(of: module) ?? [] { + if swiftPackageManager?.isManaging(module: importedName) == true { + try recurseSwiftPackages(from: importedName, importedBy: module, importerType: .other, building: &nodeList, skipping: &modulesToSkip) + } else if customProjectManager?.isManaging(module: importedName) == true { + try recurseCustomXcodeProjects(from: importedName, importedBy: module, importerType: .other, building: &nodeList, skipping: &modulesToSkip) + } else if cocoapodsManager?.isManaging(module: importedName) == true { + try recurseCocoapods(from: importedName, importedBy: module, importerType: .other, building: &nodeList, skipping: &modulesToSkip) + } else if nativeManager?.isManaging(module: importedName) == true { + modulesToSkip.insert(importedName) + + let _nodes = try plugin_process(library: XCGrapherImport(moduleName: importedName, importerName: module, moduleType: .apple, importerType: .other)) + nodeList.append(contentsOf: _nodes) + } + } + } + } // MARK: - Plugin Caller Proxies diff --git a/Sources/XCGrapherLib/ShellTasks/XCWorkspace.swift b/Sources/XCGrapherLib/ShellTasks/XCWorkspace.swift new file mode 100644 index 0000000..b861da5 --- /dev/null +++ b/Sources/XCGrapherLib/ShellTasks/XCWorkspace.swift @@ -0,0 +1,79 @@ +// +// XCWorkspace.swift +// +// +// Created by Max Chuquimia on 1/2/2023. +// + +import Foundation + +struct XCWorkspace { + + let file: FileManager.Path + let options: XCGrapherOptions + + func referencesList() throws -> [FileManager.Path] { + try execute() + .breakIntoLines() + .filter { !$0.isEmpty } + } + + func xcodeProjectList() throws -> [FileManager.Path] { + try referencesList() + .filter { path in + path.hasSuffix(".xcodeproj") + } + } + + func fakeHeaderFile() throws -> FileManager.Path { + let xcodeTargets = try xcodeProjectList() + .flatMap { path in + try XcodeprojTargets(projectFile: path).targetList() + } + + let spmTargets = try swiftPackagesList() + .flatMap { path in + try SwiftPackage(clone: path).targets() + } + .map(\.name) + + let fakeFilePath = "/tmp/WorkspaceHeader.swift" + var fakeFile = + """ + // Generated by XCGrapher. + // This file is a kind of "header" for \(file). + // It imports all targets discovered in the workspace to provide a starting point for XCGrapher. + + + """ + for target in xcodeTargets + spmTargets { + fakeFile.append("import " + target + "\n") + } + + try fakeFile + .data(using: .utf8)! + .write(to: URL(fileURLWithPath: fakeFilePath)) + + return fakeFilePath + } + + func swiftPackagesList() throws -> [FileManager.Path] { + try referencesList() + .filter { path in + FileManager.default.fileExists(atPath: path.appendingPathComponent("Package.swift")) + } + } + +} + +extension XCWorkspace: ShellTask { + + var stringRepresentation: String { + "ruby -r xcodeproj -e 'Xcodeproj::Workspace.new_from_xcworkspace(\"\(file)\").schemes.each do |s| puts s[1] end'" + } + + var commandNotFoundInstructions: String { + "Missing command 'xcodeproj' - install it with `gem install xcodeproj` or see https://github.com/CocoaPods/Xcodeproj" + } + +} diff --git a/Sources/XCGrapherLib/ShellTasks/Xcodebuild.swift b/Sources/XCGrapherLib/ShellTasks/Xcodebuild.swift index 8b5f673..a4580cf 100644 --- a/Sources/XCGrapherLib/ShellTasks/Xcodebuild.swift +++ b/Sources/XCGrapherLib/ShellTasks/Xcodebuild.swift @@ -1,8 +1,16 @@ import Foundation struct Xcodebuild: SwiftPackageDependencySource { - let projectFile: FileManager.Path - let target: String + + let commandArgs: String + + init(projectFile: FileManager.Path, target: String) { + commandArgs = "-project \"\(projectFile)\" -target \"\(target)\"" + } + + init(workspaceFile: FileManager.Path, scheme: String) { + commandArgs = "-workspace \"\(workspaceFile)\" -scheme \"\(scheme)\"" + } func computeCheckoutsDirectory() throws -> String { // Clone all the packages into $DERIVED_DATA/SourcePackages/checkouts @@ -26,7 +34,7 @@ struct Xcodebuild: SwiftPackageDependencySource { extension Xcodebuild: ShellTask { var stringRepresentation: String { - "xcodebuild -project \"\(projectFile)\" -target \"\(target)\" -showBuildSettings" + "xcodebuild \(commandArgs) -showBuildSettings" } var commandNotFoundInstructions: String { diff --git a/Sources/XCGrapherLib/ShellTasks/XcodeprojTargets.swift b/Sources/XCGrapherLib/ShellTasks/XcodeprojTargets.swift new file mode 100644 index 0000000..230314a --- /dev/null +++ b/Sources/XCGrapherLib/ShellTasks/XcodeprojTargets.swift @@ -0,0 +1,32 @@ +// +// XcodeprojTargets.swift +// +// +// Created by Max Chuquimia on 1/2/2023. +// + +import Foundation + +struct XcodeprojTargets { + + let projectFile: FileManager.Path + + func targetList() throws -> [String] { + try execute() + .breakIntoLines() + .filter { !$0.isEmpty } + } + +} + +extension XcodeprojTargets: ShellTask { + + var stringRepresentation: String { + "ruby -r xcodeproj -e 'Xcodeproj::Project.open(\"\(projectFile)\").targets.each do |t| puts t.name end'" + } + + var commandNotFoundInstructions: String { + "Missing command 'xcodeproj' - install it with `gem install xcodeproj` or see https://github.com/CocoaPods/Xcodeproj" + } + +} diff --git a/Sources/XCGrapherLib/XCGrapher.swift b/Sources/XCGrapherLib/XCGrapher.swift index 829e362..22cfbf7 100644 --- a/Sources/XCGrapherLib/XCGrapher.swift +++ b/Sources/XCGrapherLib/XCGrapher.swift @@ -13,25 +13,31 @@ public enum XCGrapher { Log("Generating list of source files in \(options.startingPoint.localisedName)") var sources: [FileManager.Path] = [] switch options.startingPoint { - case let .xcodeProject(project): - let xcodeproj = Xcodeproj(projectFile: project, target: options.target) + case let .xcodeProject(project, target): + let xcodeproj = Xcodeproj(projectFile: project, target: target) sources = try xcodeproj.compileSourcesList() - case let .swiftPackage(packagePath): + case let .swiftPackage(packagePath, target): let package = SwiftPackage(clone: packagePath) - guard let target = try package.targets().first(where: { $0.name == options.target }) else { die("Could not locate target '\(options.target)'") } + guard let target = try package.targets().first(where: { $0.name == target }) else { die("Could not locate target '\(target)'") } sources = target.sources + case let .xcodeWorkspace(workspace, _): + sources = [try XCWorkspace(file: workspace, options: options).fakeHeaderFile()] } // MARK: - Create dependency manager lookups if options.spm || options.startingPoint.isSPM { Log("Building Swift Package list") + var additionalPackages: [FileManager.Path] = [] let swiftPackageDependencySource: SwiftPackageDependencySource switch options.startingPoint { - case .xcodeProject: swiftPackageDependencySource = Xcodebuild(projectFile: options.startingPoint.path, target: options.target) - case .swiftPackage: swiftPackageDependencySource = SwiftBuild(packagePath: options.startingPoint.path, product: options.target) + case let .xcodeProject(path, target): swiftPackageDependencySource = Xcodebuild(projectFile: path, target: target) + case let .swiftPackage(path, target): swiftPackageDependencySource = SwiftBuild(packagePath: path, product: target) + case let .xcodeWorkspace(path, scheme): + swiftPackageDependencySource = Xcodebuild(workspaceFile: path, scheme: scheme) + additionalPackages = try XCWorkspace(file: path, options: options).swiftPackagesList() } - let swiftPackageClones = try swiftPackageDependencySource.swiftPackageDependencies() + let swiftPackageClones = try swiftPackageDependencySource.swiftPackageDependencies() + additionalPackages let swiftPackageManager = try SwiftPackageManager(packageClones: swiftPackageClones) pluginHandler.swiftPackageManager = swiftPackageManager } @@ -48,9 +54,16 @@ public enum XCGrapher { pluginHandler.nativeManager = nativeManager } + if case let .xcodeWorkspace(path, _) = options.startingPoint { + Log("Building custom framework list") + let projects = try XCWorkspace(file: path, options: options).xcodeProjectList() + let customManager = try XcodeProjectAsDependencyManager(projects: projects) + pluginHandler.customProjectManager = customManager + } + if options.force { Log("Ensuring all additional modules are graphed") - // Don't ignore unknown dependencies - add a manager that claims it is reponsible for them being there. + // Don't ignore unknown dependencies - add a manager that claims it is responsible for them being there. // MUST be last in `allDependencyManagers`. let unknownManager = UnmanagedDependencyManager() pluginHandler.unknownManager = unknownManager @@ -60,8 +73,15 @@ public enum XCGrapher { Log("Graphing...") + let digraphTargetDisplayName: String + switch options.startingPoint { + case let .xcodeProject(_, target): digraphTargetDisplayName = target + case let .swiftPackage(_, target): digraphTargetDisplayName = target + case let .xcodeWorkspace(workspace, _): digraphTargetDisplayName = workspace.lastPathComponent() + } + let digraph = try pluginHandler.generateDigraph( - target: options.target, + target: digraphTargetDisplayName, projectSourceFiles: sources ) diff --git a/Sources/XCGrapherLib/XCGrapherOptions.swift b/Sources/XCGrapherLib/XCGrapherOptions.swift index 7cdf078..f4c8dfa 100644 --- a/Sources/XCGrapherLib/XCGrapherOptions.swift +++ b/Sources/XCGrapherLib/XCGrapherOptions.swift @@ -2,7 +2,6 @@ import Foundation public protocol XCGrapherOptions { var startingPoint: StartingPoint { get } - var target: String { get } var podlock: String { get } var output: String { get } var apple: Bool { get } @@ -14,27 +13,31 @@ public protocol XCGrapherOptions { public enum StartingPoint { - case xcodeProject(String) - case swiftPackage(String) + case xcodeProject(String, String) + case swiftPackage(String, String) + case xcodeWorkspace(String, String) var localisedName: String { switch self { - case let .xcodeProject(project): return "Xcode project at path '\(project)'" - case let .swiftPackage(packagePath): return "Swift Package at path '\(packagePath)'" + case let .xcodeProject(project, _): return "Xcode project at path '\(project)'" + case let .swiftPackage(packagePath, _): return "Swift Package at path '\(packagePath)'" + case let .xcodeWorkspace(workspace, _): return "Xcode workspace at path '\(workspace)'" } } var isSPM: Bool { switch self { - case .xcodeProject: return false + case .xcodeProject, .xcodeWorkspace: return false case .swiftPackage: return true } } var path: String { switch self { - case let .xcodeProject(projectPath): return projectPath - case let .swiftPackage(packagePath): return packagePath + case + let .xcodeProject(path, _), + let .swiftPackage(path, _), + let .xcodeWorkspace(path, _): return path } } diff --git a/Sources/xcgrapher/XCGrapherArguments.swift b/Sources/xcgrapher/XCGrapherArguments.swift index 7678003..e8a1276 100644 --- a/Sources/xcgrapher/XCGrapherArguments.swift +++ b/Sources/xcgrapher/XCGrapherArguments.swift @@ -10,8 +10,14 @@ struct xcgrapher: ParsableArguments { @Option(name: .long, help: "The path to the .xcodeproj") public var project: String? + @Option(name: .long, help: "The path to a .xcworkspace") + public var workspace: String? + @Option(name: .long, help: "The name of the Xcode project target (or Swift Package product) to use as a starting point") - public var target: String + public var target: String? + + @Option(name: .long, help: "The name of the Xcode workspace scheme to use as a starting point (does not filter graph output)") + public var scheme: String? @Option(name: .long, help: "The path to a Swift Package directory") public var package: String? @@ -38,31 +44,51 @@ struct xcgrapher: ParsableArguments { public var force: Bool = false var startingPoint: StartingPoint { - if let project = project { - return .xcodeProject(project) + if let project { + return .xcodeProject(project, target!) + } else if let workspace { + return .xcodeWorkspace(workspace, scheme!) } else { // Should be safe due to the implementation of validate() below - return .swiftPackage(package!) + return .swiftPackage(package!, target!) } } public func validate() throws { var isRunningForXcodeProject = false + var isRunningForXcodeWorkspace = false if let project = project { isRunningForXcodeProject = true guard FileManager.default.directoryExists(atPath: project) else { die("'\(project)' is not a valid xcode project.") } } - if !isRunningForXcodeProject { + if let workspace = workspace { + isRunningForXcodeWorkspace = true + guard FileManager.default.directoryExists(atPath: workspace) else { die("'\(workspace)' is not a valid xcode workspace.") } + } + + if !isRunningForXcodeProject && !isRunningForXcodeWorkspace { guard let package = package else { die("--project or --package must be provided.") } guard !package.isEmpty else { die("--package is invalid") } guard FileManager.default.fileExists(atPath: package.appendingPathComponent("Package.swift")) else { die("'\(package)' is not a valid Swift Package directory") } } - guard !target.isEmpty else { die("--target must not be empty.") } - if isRunningForXcodeProject { + guard let target, !target.isEmpty else { die("--target must not be empty.") } + if let scheme, !scheme.isEmpty { + die("--scheme is invalid when using --project") + } + } + + if isRunningForXcodeWorkspace { + guard let scheme, !scheme.isEmpty else { die("--scheme must not be empty.") } + if let target, !target.isEmpty { + die("--target is invalid when using --workspace") + } + } + + if isRunningForXcodeProject || isRunningForXcodeWorkspace { guard spm || apple || pods else { die("Must include at least one of --apple, --spm or --pods") } } } diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.pbxproj b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.pbxproj new file mode 100644 index 0000000..481bdf7 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.pbxproj @@ -0,0 +1,344 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 5171E03D2989BE090054B4AA /* Framework1.h in Headers */ = {isa = PBXBuildFile; fileRef = 5171E03C2989BE090054B4AA /* Framework1.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5171E04B298A35510054B4AA /* Something.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5171E04A298A35510054B4AA /* Something.swift */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 5171E0392989BE090054B4AA /* Framework1.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Framework1.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5171E03C2989BE090054B4AA /* Framework1.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Framework1.h; sourceTree = ""; }; + 5171E04A298A35510054B4AA /* Something.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Something.swift; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5171E0362989BE090054B4AA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 5171E02F2989BE090054B4AA = { + isa = PBXGroup; + children = ( + 5171E03B2989BE090054B4AA /* Framework1 */, + 5171E03A2989BE090054B4AA /* Products */, + ); + sourceTree = ""; + }; + 5171E03A2989BE090054B4AA /* Products */ = { + isa = PBXGroup; + children = ( + 5171E0392989BE090054B4AA /* Framework1.framework */, + ); + name = Products; + sourceTree = ""; + }; + 5171E03B2989BE090054B4AA /* Framework1 */ = { + isa = PBXGroup; + children = ( + 5171E03C2989BE090054B4AA /* Framework1.h */, + 5171E04A298A35510054B4AA /* Something.swift */, + ); + path = Framework1; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXHeadersBuildPhase section */ + 5171E0342989BE090054B4AA /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 5171E03D2989BE090054B4AA /* Framework1.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 5171E0382989BE090054B4AA /* Framework1 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5171E0402989BE090054B4AA /* Build configuration list for PBXNativeTarget "Framework1" */; + buildPhases = ( + 5171E0342989BE090054B4AA /* Headers */, + 5171E0352989BE090054B4AA /* Sources */, + 5171E0362989BE090054B4AA /* Frameworks */, + 5171E0372989BE090054B4AA /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Framework1; + productName = Framework1; + productReference = 5171E0392989BE090054B4AA /* Framework1.framework */; + productType = "com.apple.product-type.framework"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 5171E0302989BE090054B4AA /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastUpgradeCheck = 1420; + TargetAttributes = { + 5171E0382989BE090054B4AA = { + CreatedOnToolsVersion = 14.2; + LastSwiftMigration = 1420; + }; + }; + }; + buildConfigurationList = 5171E0332989BE090054B4AA /* Build configuration list for PBXProject "Framework1" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 5171E02F2989BE090054B4AA; + productRefGroup = 5171E03A2989BE090054B4AA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 5171E0382989BE090054B4AA /* Framework1 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 5171E0372989BE090054B4AA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 5171E0352989BE090054B4AA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5171E04B298A35510054B4AA /* Something.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 5171E03E2989BE090054B4AA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 5171E03F2989BE090054B4AA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 5171E0412989BE090054B4AA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.chuquimianproductions.Framework1; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 5171E0422989BE090054B4AA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + CLANG_ENABLE_MODULES = YES; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_NSHumanReadableCopyright = ""; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.chuquimianproductions.Framework1; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SKIP_INSTALL = YES; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 5171E0332989BE090054B4AA /* Build configuration list for PBXProject "Framework1" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5171E03E2989BE090054B4AA /* Debug */, + 5171E03F2989BE090054B4AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5171E0402989BE090054B4AA /* Build configuration list for PBXNativeTarget "Framework1" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5171E0412989BE090054B4AA /* Debug */, + 5171E0422989BE090054B4AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 5171E0302989BE090054B4AA /* Project object */; +} diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1/Framework1.h b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1/Framework1.h new file mode 100644 index 0000000..4f47eb1 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1/Framework1.h @@ -0,0 +1,18 @@ +// +// Framework1.h +// Framework1 +// +// Created by Max Chuquimia on 1/2/2023. +// + +#import + +//! Project version number for Framework1. +FOUNDATION_EXPORT double Framework1VersionNumber; + +//! Project version string for Framework1. +FOUNDATION_EXPORT const unsigned char Framework1VersionString[]; + +// In this header, you should import all the public headers of your framework using statements like #import + + diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1/Something.swift b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1/Something.swift new file mode 100644 index 0000000..d757ff1 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Framework1/Framework1/Something.swift @@ -0,0 +1,9 @@ +// +// Something.swift +// Framework1 +// +// Created by Max Chuquimia on 1/2/2023. +// + +import Foundation +import AVKit diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1.xcodeproj/project.pbxproj b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1.xcodeproj/project.pbxproj new file mode 100644 index 0000000..53b07d8 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1.xcodeproj/project.pbxproj @@ -0,0 +1,382 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 56; + objects = { + +/* Begin PBXBuildFile section */ + 5171E0222989BDD30054B4AA /* Project1App.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5171E0212989BDD30054B4AA /* Project1App.swift */; }; + 5171E0242989BDD30054B4AA /* ContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5171E0232989BDD30054B4AA /* ContentView.swift */; }; + 5171E0262989BDD40054B4AA /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5171E0252989BDD40054B4AA /* Assets.xcassets */; }; + 5171E0292989BDD40054B4AA /* Preview Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 5171E0282989BDD40054B4AA /* Preview Assets.xcassets */; }; + 5171E0452989BE440054B4AA /* MyLibrary in Frameworks */ = {isa = PBXBuildFile; productRef = 5171E0442989BE440054B4AA /* MyLibrary */; }; + 5171E0472989BE470054B4AA /* Framework1.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5171E0462989BE470054B4AA /* Framework1.framework */; }; + 5171E0482989BE470054B4AA /* Framework1.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 5171E0462989BE470054B4AA /* Framework1.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; +/* End PBXBuildFile section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 5171E0492989BE480054B4AA /* Embed Frameworks */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 5171E0482989BE470054B4AA /* Framework1.framework in Embed Frameworks */, + ); + name = "Embed Frameworks"; + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 5171E01E2989BDD30054B4AA /* Project1.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Project1.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 5171E0212989BDD30054B4AA /* Project1App.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Project1App.swift; sourceTree = ""; }; + 5171E0232989BDD30054B4AA /* ContentView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentView.swift; sourceTree = ""; }; + 5171E0252989BDD40054B4AA /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; }; + 5171E0282989BDD40054B4AA /* Preview Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = "Preview Assets.xcassets"; sourceTree = ""; }; + 5171E0462989BE470054B4AA /* Framework1.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = Framework1.framework; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 5171E01B2989BDD30054B4AA /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 5171E0452989BE440054B4AA /* MyLibrary in Frameworks */, + 5171E0472989BE470054B4AA /* Framework1.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 5171E0152989BDD30054B4AA = { + isa = PBXGroup; + children = ( + 5171E0202989BDD30054B4AA /* Project1 */, + 5171E01F2989BDD30054B4AA /* Products */, + 5171E0432989BE440054B4AA /* Frameworks */, + ); + sourceTree = ""; + }; + 5171E01F2989BDD30054B4AA /* Products */ = { + isa = PBXGroup; + children = ( + 5171E01E2989BDD30054B4AA /* Project1.app */, + ); + name = Products; + sourceTree = ""; + }; + 5171E0202989BDD30054B4AA /* Project1 */ = { + isa = PBXGroup; + children = ( + 5171E0212989BDD30054B4AA /* Project1App.swift */, + 5171E0232989BDD30054B4AA /* ContentView.swift */, + 5171E0252989BDD40054B4AA /* Assets.xcassets */, + 5171E0272989BDD40054B4AA /* Preview Content */, + ); + path = Project1; + sourceTree = ""; + }; + 5171E0272989BDD40054B4AA /* Preview Content */ = { + isa = PBXGroup; + children = ( + 5171E0282989BDD40054B4AA /* Preview Assets.xcassets */, + ); + path = "Preview Content"; + sourceTree = ""; + }; + 5171E0432989BE440054B4AA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 5171E0462989BE470054B4AA /* Framework1.framework */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 5171E01D2989BDD30054B4AA /* Project1 */ = { + isa = PBXNativeTarget; + buildConfigurationList = 5171E02C2989BDD40054B4AA /* Build configuration list for PBXNativeTarget "Project1" */; + buildPhases = ( + 5171E01A2989BDD30054B4AA /* Sources */, + 5171E01B2989BDD30054B4AA /* Frameworks */, + 5171E01C2989BDD30054B4AA /* Resources */, + 5171E0492989BE480054B4AA /* Embed Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Project1; + packageProductDependencies = ( + 5171E0442989BE440054B4AA /* MyLibrary */, + ); + productName = Project1; + productReference = 5171E01E2989BDD30054B4AA /* Project1.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 5171E0162989BDD30054B4AA /* Project object */ = { + isa = PBXProject; + attributes = { + BuildIndependentTargetsInParallel = 1; + LastSwiftUpdateCheck = 1420; + LastUpgradeCheck = 1420; + TargetAttributes = { + 5171E01D2989BDD30054B4AA = { + CreatedOnToolsVersion = 14.2; + }; + }; + }; + buildConfigurationList = 5171E0192989BDD30054B4AA /* Build configuration list for PBXProject "Project1" */; + compatibilityVersion = "Xcode 14.0"; + developmentRegion = en; + hasScannedForEncodings = 0; + knownRegions = ( + en, + Base, + ); + mainGroup = 5171E0152989BDD30054B4AA; + productRefGroup = 5171E01F2989BDD30054B4AA /* Products */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 5171E01D2989BDD30054B4AA /* Project1 */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 5171E01C2989BDD30054B4AA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5171E0292989BDD40054B4AA /* Preview Assets.xcassets in Resources */, + 5171E0262989BDD40054B4AA /* Assets.xcassets in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 5171E01A2989BDD30054B4AA /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5171E0242989BDD30054B4AA /* ContentView.swift in Sources */, + 5171E0222989BDD30054B4AA /* Project1App.swift in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin XCBuildConfiguration section */ + 5171E02A2989BDD40054B4AA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + SDKROOT = iphoneos; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + }; + name = Debug; + }; + 5171E02B2989BDD40054B4AA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++20"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 16.2; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_OPTIMIZATION_LEVEL = "-O"; + VALIDATE_PRODUCT = YES; + }; + name = Release; + }; + 5171E02D2989BDD40054B4AA /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Project1/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.chuquimianproductions.Project1; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Debug; + }; + 5171E02E2989BDD40054B4AA /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; + ASSETCATALOG_COMPILER_GLOBAL_ACCENT_COLOR_NAME = AccentColor; + CODE_SIGN_STYLE = Automatic; + CURRENT_PROJECT_VERSION = 1; + DEVELOPMENT_ASSET_PATHS = "\"Project1/Preview Content\""; + ENABLE_PREVIEWS = YES; + GENERATE_INFOPLIST_FILE = YES; + INFOPLIST_KEY_UIApplicationSceneManifest_Generation = YES; + INFOPLIST_KEY_UIApplicationSupportsIndirectInputEvents = YES; + INFOPLIST_KEY_UILaunchScreen_Generation = YES; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight"; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + ); + MARKETING_VERSION = 1.0; + PRODUCT_BUNDLE_IDENTIFIER = com.chuquimianproductions.Project1; + PRODUCT_NAME = "$(TARGET_NAME)"; + SWIFT_EMIT_LOC_STRINGS = YES; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 5171E0192989BDD30054B4AA /* Build configuration list for PBXProject "Project1" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5171E02A2989BDD40054B4AA /* Debug */, + 5171E02B2989BDD40054B4AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5171E02C2989BDD40054B4AA /* Build configuration list for PBXNativeTarget "Project1" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 5171E02D2989BDD40054B4AA /* Debug */, + 5171E02E2989BDD40054B4AA /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + +/* Begin XCSwiftPackageProductDependency section */ + 5171E0442989BE440054B4AA /* MyLibrary */ = { + isa = XCSwiftPackageProductDependency; + productName = MyLibrary; + }; +/* End XCSwiftPackageProductDependency section */ + }; + rootObject = 5171E0162989BDD30054B4AA /* Project object */; +} diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1.xcodeproj/xcshareddata/xcschemes/Project1.xcscheme b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1.xcodeproj/xcshareddata/xcschemes/Project1.xcscheme new file mode 100644 index 0000000..98aa44d --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1.xcodeproj/xcshareddata/xcschemes/Project1.xcscheme @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/AccentColor.colorset/Contents.json b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/AccentColor.colorset/Contents.json new file mode 100644 index 0000000..eb87897 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/AccentColor.colorset/Contents.json @@ -0,0 +1,11 @@ +{ + "colors" : [ + { + "idiom" : "universal" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/AppIcon.appiconset/Contents.json b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/AppIcon.appiconset/Contents.json new file mode 100644 index 0000000..13613e3 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/AppIcon.appiconset/Contents.json @@ -0,0 +1,13 @@ +{ + "images" : [ + { + "idiom" : "universal", + "platform" : "ios", + "size" : "1024x1024" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/Contents.json b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/ContentView.swift b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/ContentView.swift new file mode 100644 index 0000000..de0a459 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/ContentView.swift @@ -0,0 +1,27 @@ +// +// ContentView.swift +// Project1 +// +// Created by Max Chuquimia on 1/2/2023. +// + +import SwiftUI +import CoreMIDI + +struct ContentView: View { + var body: some View { + VStack { + Image(systemName: "globe") + .imageScale(.large) + .foregroundColor(.accentColor) + Text("Hello, world!") + } + .padding() + } +} + +struct ContentView_Previews: PreviewProvider { + static var previews: some View { + ContentView() + } +} diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Preview Content/Preview Assets.xcassets/Contents.json b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Preview Content/Preview Assets.xcassets/Contents.json new file mode 100644 index 0000000..73c0059 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Preview Content/Preview Assets.xcassets/Contents.json @@ -0,0 +1,6 @@ +{ + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Project1App.swift b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Project1App.swift new file mode 100644 index 0000000..518297b --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/AnyDirectory/Project1/Project1/Project1App.swift @@ -0,0 +1,19 @@ +// +// Project1App.swift +// Project1 +// +// Created by Max Chuquimia on 1/2/2023. +// + +import SwiftUI +import MyLibrary +import Framework1 + +@main +struct Project1App: App { + var body: some Scene { + WindowGroup { + ContentView() + } + } +} diff --git a/Tests/SampleProjects/SomeWorkspace/MyLibrary/.gitignore b/Tests/SampleProjects/SomeWorkspace/MyLibrary/.gitignore new file mode 100644 index 0000000..3b29812 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/MyLibrary/.gitignore @@ -0,0 +1,9 @@ +.DS_Store +/.build +/Packages +/*.xcodeproj +xcuserdata/ +DerivedData/ +.swiftpm/config/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata +.netrc diff --git a/Tests/SampleProjects/SomeWorkspace/MyLibrary/.swiftpm/xcode/xcshareddata/xcschemes/MyLibrary.xcscheme b/Tests/SampleProjects/SomeWorkspace/MyLibrary/.swiftpm/xcode/xcshareddata/xcschemes/MyLibrary.xcscheme new file mode 100644 index 0000000..5c81a61 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/MyLibrary/.swiftpm/xcode/xcshareddata/xcschemes/MyLibrary.xcscheme @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/SampleProjects/SomeWorkspace/MyLibrary/.swiftpm/xcode/xcshareddata/xcschemes/RandomTestScheme.xcscheme b/Tests/SampleProjects/SomeWorkspace/MyLibrary/.swiftpm/xcode/xcshareddata/xcschemes/RandomTestScheme.xcscheme new file mode 100644 index 0000000..c0a23ed --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/MyLibrary/.swiftpm/xcode/xcshareddata/xcschemes/RandomTestScheme.xcscheme @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/Tests/SampleProjects/SomeWorkspace/MyLibrary/Package.swift b/Tests/SampleProjects/SomeWorkspace/MyLibrary/Package.swift new file mode 100644 index 0000000..39ef412 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/MyLibrary/Package.swift @@ -0,0 +1,29 @@ +// swift-tools-version: 5.7 +// The swift-tools-version declares the minimum version of Swift required to build this package. + +import PackageDescription + +let package = Package( + name: "MyLibrary", + products: [ + // Products define the executables and libraries a package produces, and make them visible to other packages. + .library( + name: "MyLibrary", + targets: ["MyLibrary"]), + ], + dependencies: [ + .package(name: "Kingfisher", url: "https://github.com/onevcat/Kingfisher.git", .upToNextMajor(from: "6.0.0")), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "MyLibrary", + dependencies: [ + "Kingfisher" + ]), + .testTarget( + name: "MyLibraryTests", + dependencies: ["MyLibrary"]), + ] +) diff --git a/Tests/SampleProjects/SomeWorkspace/MyLibrary/README.md b/Tests/SampleProjects/SomeWorkspace/MyLibrary/README.md new file mode 100644 index 0000000..a4342dc --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/MyLibrary/README.md @@ -0,0 +1,3 @@ +# MyLibrary + +A description of this package. diff --git a/Tests/SampleProjects/SomeWorkspace/MyLibrary/Sources/MyLibrary/MyLibrary.swift b/Tests/SampleProjects/SomeWorkspace/MyLibrary/Sources/MyLibrary/MyLibrary.swift new file mode 100644 index 0000000..9821be6 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/MyLibrary/Sources/MyLibrary/MyLibrary.swift @@ -0,0 +1,9 @@ +import Foundation +import Kingfisher + +public struct MyLibrary { + public private(set) var text = "Hello, World!" + + public init() { + } +} diff --git a/Tests/SampleProjects/SomeWorkspace/MyLibrary/Tests/MyLibraryTests/MyLibraryTests.swift b/Tests/SampleProjects/SomeWorkspace/MyLibrary/Tests/MyLibraryTests/MyLibraryTests.swift new file mode 100644 index 0000000..84e4233 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/MyLibrary/Tests/MyLibraryTests/MyLibraryTests.swift @@ -0,0 +1,11 @@ +import XCTest +@testable import MyLibrary + +final class MyLibraryTests: XCTestCase { + func testExample() throws { + // This is an example of a functional test case. + // Use XCTAssert and related functions to verify your tests produce the correct + // results. + XCTAssertEqual(MyLibrary().text, "Hello, World!") + } +} diff --git a/Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/contents.xcworkspacedata b/Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..3bdaef4 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,13 @@ + + + + + + + + + diff --git a/Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved b/Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved new file mode 100644 index 0000000..30a5f20 --- /dev/null +++ b/Tests/SampleProjects/SomeWorkspace/SomeWorkspace.xcworkspace/xcshareddata/swiftpm/Package.resolved @@ -0,0 +1,14 @@ +{ + "pins" : [ + { + "identity" : "kingfisher", + "kind" : "remoteSourceControl", + "location" : "https://github.com/onevcat/Kingfisher.git", + "state" : { + "revision" : "d06df9adf50ed8cde5786d935836a5f445f780ba", + "version" : "6.3.1" + } + } + ], + "version" : 2 +} diff --git a/Tests/XCGrapherLibTests/XCGrapherTests+SPM.swift b/Tests/XCGrapherLibTests/XCGrapherTests+SPM.swift index 9cba6df..c11029b 100644 --- a/Tests/XCGrapherLibTests/XCGrapherTests+SPM.swift +++ b/Tests/XCGrapherLibTests/XCGrapherTests+SPM.swift @@ -57,8 +57,7 @@ private struct ConcreteGrapherOptions: XCGrapherOptions { .appendingPathComponent("SomePackage") .path - var startingPoint: StartingPoint = .swiftPackage(somePackageRoot) - var target: String = "SomePackage" + var startingPoint: StartingPoint = .swiftPackage(somePackageRoot, "SomePackage") var podlock: String = "" var output: String = "/tmp/xcgraphertests.png" var apple: Bool = false diff --git a/Tests/XCGrapherLibTests/XCGrapherTests+Xcodeproject.swift b/Tests/XCGrapherLibTests/XCGrapherTests+Xcodeproject.swift index f0ce16c..c70db27 100644 --- a/Tests/XCGrapherLibTests/XCGrapherTests+Xcodeproject.swift +++ b/Tests/XCGrapherLibTests/XCGrapherTests+Xcodeproject.swift @@ -125,8 +125,7 @@ private struct ConcreteGrapherOptions: XCGrapherOptions { .appendingPathComponent("SomeApp") .path - var startingPoint: StartingPoint = .xcodeProject(someAppRoot.appendingPathComponent("SomeApp.xcodeproj")) - var target: String = "SomeApp" + var startingPoint: StartingPoint = .xcodeProject(someAppRoot.appendingPathComponent("SomeApp.xcodeproj"), "SomeApp") var podlock: String = someAppRoot.appendingPathComponent("Podfile.lock") var output: String = "/tmp/xcgraphertests.png" var apple: Bool = false