Type Method

package(url:_:)

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

Declaration

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

Parameters

url

The valid Git URL of the package.

range

The custom version range requirement.

Discussion

The following example allows the Swift package manager to pick versions 1.2.3, 1.2.4, 1.2.5, but not 1.2.6.

.package(url: "https://example.com/example-package.git", "1.2.3"..<"1.2.6"),

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, 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.

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

Add a dependency to a local package on the filesystem.