Dependency
public final class Dependency: CustomStringConvertible, Codable
An external package that the current project relies on.
These are stored in the manifest’s dependencies array.
-
Keys used to encode/decode a
Targetobject.Declaration
Swift
public typealias CodingKeys = DependencyCodingKeys -
The URI or path to the dependency.
Declaration
Swift
public let url: String -
The version of the dependency. This could be one of multiple cases
Declaration
Swift
public var version: DependencyVersionType -
Declaration
Swift
public init(url: String, version: DependencyVersionType) -
Declaration
Swift
public init(from decoder: Decoder) throws -
The dependency formatted for the manifest.
Declaration
Swift
public var description: String -
Declaration
Swift
public func encode(to encoder: Encoder) throws
-
Updates the dependency’s instance in the project’s manifest. If the instance does not exist yet, it will be created.
Throws
Errors that occur when creating a RegEx pattern or reading or writing the manifest.Declaration
Swift
public func save() throws
-
Removes the dependency instance from the manifest’s
Package.dependenciesarray.Throws
Errors that occur when creating a RegEx pattern or reading or writing the manifest.Declaration
Swift
public func delete() throws
Dependency Class Reference