Skip to content

Translation 🌍

You can translate or improve the translation of this page.

Contribute

STRUCT

Tuist.GenerationOptions

Contents

  • Properties
    • resolveDependenciesWithSystemScm
    • disablePackageVersionLocking
    • clonedSourcePackagesDirPath
    • additionalPackageResolutionArguments
    • staticSideEffectsWarningTargets
    • enforceExplicitDependencies
    • defaultConfiguration
    • optionalAuthentication
    • buildInsightsDisabled
    • disableSandbox
    • includeGenerateScheme
  • Methods
    • options(disablePackageVersionLocking:staticSideEffectsWarningTargets:defaultConfiguration:optionalAuthentication:buildInsightsDisabled:disableSandbox:includeGenerateScheme:additionalPackageResolutionArguments:)
    • options(resolveDependenciesWithSystemScm:disablePackageVersionLocking:clonedSourcePackagesDirPath:staticSideEffectsWarningTargets:defaultConfiguration:optionalAuthentication:buildInsightsDisabled:disableSandbox:includeGenerateScheme:)
    • options(resolveDependenciesWithSystemScm:disablePackageVersionLocking:clonedSourcePackagesDirPath:staticSideEffectsWarningTargets:enforceExplicitDependencies:defaultConfiguration:optionalAuthentication:)
swift
public struct GenerationOptions: Codable, Equatable, Sendable

Options for project generation.

Properties

resolveDependenciesWithSystemScm

swift
public var resolveDependenciesWithSystemScm: Bool

This is now deprecated.

To achieve the same behaviour, use additionalPackageResolutionArguments like so:

swift
.options(
    additionalPackageResolutionArguments: ["-scmProvider", "system"]
)

disablePackageVersionLocking

swift
public var disablePackageVersionLocking: Bool

Disables locking Swift packages. This can speed up generation but does increase risk if packages are not locked in their declarations.

clonedSourcePackagesDirPath

swift
public var clonedSourcePackagesDirPath: Path?

This is now deprecated.

To achieve the same behaviour, use additionalPackageResolutionArguments like so:

swift
.options(
    additionalPackageResolutionArguments: ["-clonedSourcePackagesDirPath", "/path/to/dir/MyWorkspace"]
)

Note that /path/to/dir is the path you would have passed to clonedSourcePackagesDirPath, and MyWorkspace is the name of your workspace.

additionalPackageResolutionArguments

swift
public var additionalPackageResolutionArguments: [String]

A list of arguments to be passed to xcodebuild when resolving package dependencies.

staticSideEffectsWarningTargets

swift
public var staticSideEffectsWarningTargets: StaticSideEffectsWarningTargets

Allows configuring which targets Tuist checks for potential side effects due multiple branches of the graph including the same static library of framework as a transitive dependency.

enforceExplicitDependencies

swift
public let enforceExplicitDependencies: Bool

The generated project has build settings and build paths modified in such a way that projects with implicit dependencies won't build until all dependencies are declared explicitly.

defaultConfiguration

swift
public var defaultConfiguration: String?

The default configuration to be used when generating the project. If not specified, Tuist generates for the first (when alphabetically sorted) debug configuration.

optionalAuthentication

swift
public var optionalAuthentication: Bool

Marks whether the Tuist server authentication is optional. If present, the interaction with the Tuist server will be skipped (instead of failing) if a user is not authenticated.

buildInsightsDisabled

swift
public var buildInsightsDisabled: Bool

When disabled, build insights are not collected. Build insights are never collected unless you are connected to a remote Tuist project. Default value is true.

disableSandbox

swift
public var disableSandbox: Bool

Disables building manifests in a sandboxed environment.

  • Warning: This is discouraged and should only be used if absolutely necessary. It guards against using file system operations which:
    • Make generation slow
    • Cause issues with manifest caching

includeGenerateScheme

swift
public var includeGenerateScheme: Bool

When true, it includes a scheme to run "tuist generate"

Methods

options(disablePackageVersionLocking:staticSideEffectsWarningTargets:defaultConfiguration:optionalAuthentication:buildInsightsDisabled:disableSandbox:includeGenerateScheme:additionalPackageResolutionArguments:)

swift
public static func options(
    disablePackageVersionLocking: Bool = false,
    staticSideEffectsWarningTargets: StaticSideEffectsWarningTargets = .all,
    defaultConfiguration: String? = nil,
    optionalAuthentication: Bool = false,
    buildInsightsDisabled: Bool = false,
    disableSandbox: Bool = false,
    includeGenerateScheme: Bool = true,
    additionalPackageResolutionArguments: [String] = []
) -> Self

options(resolveDependenciesWithSystemScm:disablePackageVersionLocking:clonedSourcePackagesDirPath:staticSideEffectsWarningTargets:defaultConfiguration:optionalAuthentication:buildInsightsDisabled:disableSandbox:includeGenerateScheme:)

swift
public static func options(
    resolveDependenciesWithSystemScm: Bool = false,
    disablePackageVersionLocking: Bool = false,
    clonedSourcePackagesDirPath: Path? = nil,
    staticSideEffectsWarningTargets: StaticSideEffectsWarningTargets = .all,
    defaultConfiguration: String? = nil,
    optionalAuthentication: Bool = false,
    buildInsightsDisabled: Bool = false,
    disableSandbox: Bool = false,
    includeGenerateScheme: Bool = true
) -> Self

options(resolveDependenciesWithSystemScm:disablePackageVersionLocking:clonedSourcePackagesDirPath:staticSideEffectsWarningTargets:enforceExplicitDependencies:defaultConfiguration:optionalAuthentication:)

swift
public static func options(
    resolveDependenciesWithSystemScm: Bool = false,
    disablePackageVersionLocking: Bool = false,
    clonedSourcePackagesDirPath: Path? = nil,
    staticSideEffectsWarningTargets: StaticSideEffectsWarningTargets = .all,
    enforceExplicitDependencies: Bool,
    defaultConfiguration: String? = nil,
    optionalAuthentication: Bool = false
) -> Self

Released under the MIT License.