STRUCT
Config
Contents
- Properties
generationOptions
installOptions
compatibleXcodeVersions
plugins
cloud
fullHandle
url
swiftVersion
- Methods
init(compatibleXcodeVersions:cloud:fullHandle:url:swiftVersion:plugins:generationOptions:installOptions:)
public struct Config: Codable, Equatable, Sendable
The configuration of your environment.
Tuist can be configured through a shared Config.swift
manifest. When Tuist is executed, it traverses up the directories to find a Tuist
directory containing a Config.swift
file. Defining a configuration manifest is not required, but recommended to ensure a consistent behaviour across all the projects that are part of the repository.
The example below shows a project that has a global Config.swift
file that will be used when Tuist is run from any of the subdirectories:
/Workspace.swift
/Tuist/Config.swift # Configuration manifest
/Framework/Project.swift
/App/Project.swift
That way, when executing Tuist in any of the subdirectories, it will use the shared configuration.
The snippet below shows an example configuration manifest:
import ProjectDescription
let config = Config(
compatibleXcodeVersions: ["14.2"],
swiftVersion: "5.9.0"
)
Properties
generationOptions
public let generationOptions: GenerationOptions
Generation options.
installOptions
public let installOptions: InstallOptions
Install options.
compatibleXcodeVersions
public let compatibleXcodeVersions: CompatibleXcodeVersions
Set the versions of Xcode that the project is compatible with.
plugins
public let plugins: [PluginLocation]
List of Plugin
s used to extend Tuist.
cloud
public let cloud: Cloud?
Cloud configuration.
fullHandle
public let fullHandle: String?
The full project handle such as tuist-org/tuist.
url
public let url: String
The base URL that points to the Tuist server.
swiftVersion
public let swiftVersion: Version?
The Swift tools versions that will be used by Tuist to fetch external dependencies. If nil
is passed then Tuist will use the environment’s version.
- Note: This does not control the
SWIFT_VERSION
build setting in regular generated projects, for this please useProject.settings
orTarget.settings
as needed.
Methods
init(compatibleXcodeVersions:cloud:fullHandle:url:swiftVersion:plugins:generationOptions:installOptions:)
public init(
compatibleXcodeVersions: CompatibleXcodeVersions = .all,
cloud: Cloud? = nil,
fullHandle: String? = nil,
url: String = "https://cloud.tuist.io",
swiftVersion: Version? = nil,
plugins: [PluginLocation] = [],
generationOptions: GenerationOptions = .options(),
installOptions: InstallOptions = .options()
)
Creates a tuist configuration.
- Parameters:
- compatibleXcodeVersions: List of Xcode versions the project is compatible with.
- cloud: Cloud configuration.
- swiftVersion: The version of Swift that will be used by Tuist.
- plugins: A list of plugins to extend Tuist.
- generationOptions: List of options to use when generating the project.
- installOptions: List of options to use when running
tuist install
.
Parameters
Name | Description |
---|---|
compatibleXcodeVersions | List of Xcode versions the project is compatible with. |
cloud | Cloud configuration. |
swiftVersion | The version of Swift that will be used by Tuist. |
plugins | A list of plugins to extend Tuist. |
generationOptions | List of options to use when generating the project. |
installOptions | List of options to use when running tuist install . |