Dependency
A module dependency to a module or product.
enum Dependency
A module dependency to a module or product.
enum Dependency
import PackageModel
class Module
case module(_: Module, conditions: [PackageCondition])
A dependency referencing another target, with conditions.
case product(_: ProductReference, conditions: [PackageCondition])
A dependency referencing a product, with conditions.
static let testModuleNameSuffix: String
Suffix that’s expected for test targets.
class var typeDescription: String { get }
Description of the module type used in swift package describe
output. Preserved for backwards compatibility.
let buildSettings: BuildSettings.AssignmentTable
The build settings assignments of this module.
let buildSettingsDescription: [TargetBuildSettingDescription.Setting]
var bundleName: String? { get }
The bundle name, if one is being generated.
var c99name: String { get }
The language-level module name.
let dependencies: [Dependency]
The dependencies of this module.
var description: String { get }
var directRefAliases: [String : [String]]? { get }
Used to store aliases that should be referenced directly in source code
let ignored: [AbsolutePath]
Files in the target that were marked as ignored.
var isEmbeddedSwiftTarget: Bool { get }
var moduleAliases: [String : String]? { get }
Module aliases needed to build this module. The key is an original name of a dependent module and the value is a new unique name mapped to the name of its .swiftmodule binary.
var name: String { get }
The name of the module.
let others: [AbsolutePath]
Other kinds of files in the module.
let packageAccess: Bool
If true, access to package declarations from other modules is allowed.
let path: AbsolutePath
The path of the module.
let pluginUsages: [PluginUsage]
The usages of package plugins by this module.
let potentialBundleName: String?
var prechainModuleAliases: [String : String]? { get }
Used to store pre-chained / pre-overriden module aliases
let resources: [Resource]
The resource files in the module.
let sources: Sources
The sources for the module.
let type: Kind
The kind of module.
let usesUnsafeFlags: Bool
Whether or not this target uses any custom unsafe flags.
static func == (lhs: Module, rhs: Module) -> Bool
func addDirectRefAliases(for name: String, as aliases: [String])
func addModuleAlias(for name: String, as alias: String)
Add module aliases (if applicable) for dependencies of this module.
func addPrechainModuleAlias(for name: String, as alias: String)
@discardableResult func applyAlias() -> Bool
func hash(into hasher: inout Hasher)
func removeModuleAlias(for name: String)
enum Group
A group a module belongs to that allows customizing access boundaries. A module is treated as a client outside of the package if excluded
, inside the package boundary if package
.
enum Kind
The module kind.
struct ProductReference
A reference to a product from a module dependency.
typealias PluginUsage = Dependency
A usage of a plugin module or product. Implemented as a dependency for now and added to the dependencies
array, since they currently have exactly the same characteristics and to avoid duplicating the implementation for now.
var conditions: [PackageCondition] { get }
The dependency conditions.
var module: Module? { get }
The module if the dependency is a target dependency.
var name: String { get }
The name of the target or product of the dependency.
var product: ProductReference? { get }
The product reference if the dependency is a product dependency.
var target: Module? { get }