STRUCT
Workspace
Contents
- Properties
nameprojectsschemesfileHeaderTemplateadditionalFilesgenerationOptionsworkspaceMapperspathxcWorkspacePath
- Methods
init(name:projects:schemes:fileHeaderTemplate:additionalFiles:generationOptions:workspaceMappers:)
public struct Workspace: Codable, EquatableA workspace representation.
By default, geko generate generates an Xcode workspace that has the same name as the current project. It includes the project and all its dependencies.
Geko allows customizing this behaviour by defining a workspace manifest within a Workspace.swift file.
Workspace manifests allow specifying a list of projects to generate and include in an Xcode workspace. Those projects don’t necessarily have to depend on one another. Additionally, files and folder references (such as documentation files) can be included in a workspace manifest.
The snippet below shows an example workspace manifest:
import ProjectDescription
let workspace = Workspace(
name: "Workspace",
projects: ["Projects/**"]
)Properties
name
public var name: StringThe name of the workspace. Also, the file name of the generated Xcode workspace.
projects
public var projects: [FilePath]The paths (or glob patterns) to manifest projects.
schemes
public var schemes: [Scheme]The custom schemes for the workspace. Default schemes for each target are generated by default.
fileHeaderTemplate
public var fileHeaderTemplate: FileHeaderTemplate?The custom file header template for Xcode built-in file templates.
additionalFiles
public var additionalFiles: [FileElement]The additional files for the workspace. For project's additional files, see Project/additionalFiles.
generationOptions
public var generationOptions: GenerationOptionsThe generation configuration of the workspace.
workspaceMappers
public var workspaceMappers: [WorkspaceMapper]The workspace mappers from plugins.
path
public var path: AbsolutePathPath to where the manifest / root directory of this workspace is located
xcWorkspacePath
public var xcWorkspacePath: AbsolutePathPath to where the .xcworkspace will be generated
Methods
init(name:projects:schemes:fileHeaderTemplate:additionalFiles:generationOptions:workspaceMappers:)
public init(
name: String,
projects: [FilePath],
schemes: [Scheme] = [],
fileHeaderTemplate: FileHeaderTemplate? = nil,
additionalFiles: [FileElement] = [],
generationOptions: GenerationOptions = .options(),
workspaceMappers: [WorkspaceMapper] = []
)