Type Method

package(path:)

Add a dependency to a local package on the filesystem.

Declaration

static func package(path: String) -> Package.Dependency

Parameters

path

The path of the package.

Discussion

The Swift Package Manager uses the package dependency as-is and does not perform any source control access. Local package dependencies are especially useful during development of a new package or when working on multiple tightly coupled packages.

See Also

Creating a Package Dependency

static func package(url: String, from: Version) -> Package.Dependency

Create a package dependency that uses the version requirement, starting with the given minimum version, going up to the next major version.

static func package(url: String, Range<Version>) -> Package.Dependency

Add a package dependency starting with a specific minimum version, up to but not including a specified maximum version.

static func package(url: String, ClosedRange<Version>) -> Package.Dependency

Add a package dependency starting with a specific minimum version, going up to and including a specific maximum version.

static func package(url: String, Package.Dependency.Requirement) -> Package.Dependency

Add a remote package dependency given a version requirement.