Skip to content

STRUCT

SourceFiles ​

Contents

  • Properties
    • paths
    • excluding
    • compilerFlags
    • codeGen
    • compilationCondition
    • contentHash
  • Methods
    • init(glob:excluding:compilerFlags:contentHash:codeGen:compilationCondition:)
    • init(paths:excluding:compilerFlags:contentHash:codeGen:compilationCondition:)
    • init(stringLiteral:)
    • glob(_:excluding:compilerFlags:codeGen:compilationCondition:)
    • glob(_:excluding:compilerFlags:codeGen:compilationCondition:)
swift
public struct SourceFiles: Equatable, Codable, ExpressibleByStringLiteral, ExpressibleByStringInterpolation

A type that represents source files.

Properties ​

paths ​

swift
public var paths: [FilePath]

Source file paths.

excluding ​

swift
public var excluding: [FilePath]

Glob patterns for source files that will be excluded.

compilerFlags ​

swift
public var compilerFlags: String?

Compiler flags When source files are added to a target, they can contain compiler flags that Xcode's build system passes to the compiler when compiling those files. By default none is passed.

codeGen ​

swift
public let codeGen: FileCodeGen?

Source file code generation attribute

compilationCondition ​

swift
public let compilationCondition: PlatformCondition?

Source file condition for platform filters

contentHash ​

swift
public var contentHash: String? = nil

This is intended to be used by the mappers that generate files through side effects. This attribute is used by the content hasher used by the caching functionality.

Methods ​

init(glob:excluding:compilerFlags:contentHash:codeGen:compilationCondition:) ​

swift
public init(
    glob: FilePath,
    excluding: [FilePath] = [],
    compilerFlags: String? = nil,
    contentHash: String? = nil,
    codeGen: FileCodeGen? = nil,
    compilationCondition: PlatformCondition? = nil
)

init(paths:excluding:compilerFlags:contentHash:codeGen:compilationCondition:) ​

swift
public init(
    paths: [FilePath],
    excluding: [FilePath] = [],
    compilerFlags: String? = nil,
    contentHash: String? = nil,
    codeGen: FileCodeGen? = nil,
    compilationCondition: PlatformCondition? = nil
)

init(stringLiteral:) ​

swift
public init(stringLiteral value: String)

Parameters ​

NameDescription
valueThe value of the new instance.

glob(_:excluding:compilerFlags:codeGen:compilationCondition:) ​

swift
public static func glob(
    _ glob: FilePath,
    excluding: [FilePath] = [],
    compilerFlags: String? = nil,
    codeGen: FileCodeGen? = nil,
    compilationCondition: PlatformCondition? = nil
) -> Self

Returns a source glob pattern configuration.

  • Parameters:
    • glob: Glob pattern to the source files.
    • excluding: Glob patterns for source files that will be excluded.
    • compilerFlags: The compiler flags to be set to the source files in the sources build phase.
    • codeGen: The source file attribute to be set in the build phase.
    • compilationCondition: Condition for file compilation.

Parameters ​

NameDescription
globGlob pattern to the source files.
excludingGlob patterns for source files that will be excluded.
compilerFlagsThe compiler flags to be set to the source files in the sources build phase.
codeGenThe source file attribute to be set in the build phase.
compilationConditionCondition for file compilation.

glob(_:excluding:compilerFlags:codeGen:compilationCondition:) ​

swift
public static func glob(
    _ glob: FilePath,
    excluding: FilePath?,
    compilerFlags: String? = nil,
    codeGen: FileCodeGen? = nil,
    compilationCondition: PlatformCondition? = nil
) -> Self