10
10
11
11
extension Package . Dependency {
12
12
13
- /// Create a package dependency that uses the version requirement, starting with the given minimum version,
13
+ /// Adds a package dependency that uses the version requirement, starting with the given minimum version,
14
14
/// going up to the next major version.
15
15
///
16
16
/// This is the recommended way to specify a remote package dependency.
@@ -20,7 +20,7 @@ extension Package.Dependency {
20
20
/// while making sure you don't update to a version with breaking changes,
21
21
/// and helps to prevent conflicts in your dependency graph.
22
22
///
23
- /// The following example allows the Swift package manager to select a version
23
+ /// The following example allows the Swift Package Manager to select a version
24
24
/// like a `1.2.3`, `1.2.4`, or `1.3.0`, but not `2.0.0`.
25
25
///
26
26
/// .package(url: "https://example.com/example-package.git", from: "1.2.3"),
@@ -37,7 +37,7 @@ extension Package.Dependency {
37
37
return . init( name: nil , url: url, requirement: . upToNextMajor( from: version) )
38
38
}
39
39
40
- /// Create a package dependency that uses the version requirement, starting with the given minimum version,
40
+ /// Adds a package dependency that uses the version requirement, starting with the given minimum version,
41
41
/// going up to the next major version.
42
42
///
43
43
/// This is the recommended way to specify a remote package dependency.
@@ -47,7 +47,7 @@ extension Package.Dependency {
47
47
/// while making sure you don't update to a version with breaking changes,
48
48
/// and helps to prevent conflicts in your dependency graph.
49
49
///
50
- /// The following example allows the Swift package manager to select a version
50
+ /// The following example allows the Swift Package Manager to select a version
51
51
/// like a `1.2.3`, `1.2.4`, or `1.3.0`, but not `2.0.0`.
52
52
///
53
53
/// .package(url: "https://example.com/example-package.git", from: "1.2.3"),
@@ -65,7 +65,7 @@ extension Package.Dependency {
65
65
return . init( name: name, url: url, requirement: . upToNextMajor( from: version) )
66
66
}
67
67
68
- /// Add a remote package dependency given a version requirement.
68
+ /// Adds a remote package dependency given a version requirement.
69
69
///
70
70
/// - Parameters:
71
71
/// - name: The name of the package, or nil to deduce it from the URL.
@@ -80,10 +80,10 @@ extension Package.Dependency {
80
80
return . init( name: nil , url: url, requirement: requirement)
81
81
}
82
82
83
- /// Add a remote package dependency given a version requirement.
83
+ /// Adds a remote package dependency with a given version requirement.
84
84
///
85
85
/// - Parameters:
86
- /// - name: The name of the package, or nil to deduce it from the URL.
86
+ /// - name: The name of the package, or ` nil` to deduce it from the URL.
87
87
/// - url: The valid Git URL of the package.
88
88
/// - requirement: A dependency requirement. See static methods on `Package.Dependency.Requirement` for available options.
89
89
@available ( _PackageDescription, introduced: 5.2 )
@@ -96,10 +96,10 @@ extension Package.Dependency {
96
96
return . init( name: name, url: url, requirement: requirement)
97
97
}
98
98
99
- /// Add a package dependency starting with a specific minimum version, up to
99
+ /// Adds a package dependency starting with a specific minimum version, up to
100
100
/// but not including a specified maximum version.
101
101
///
102
- /// The following example allows the Swift package manager to pick
102
+ /// The following example allows the Swift Package Manager to pick
103
103
/// versions `1.2.3`, `1.2.4`, `1.2.5`, but not `1.2.6`.
104
104
///
105
105
/// .package(url: "https://example.com/example-package.git", "1.2.3"..<"1.2.6"),
@@ -120,16 +120,16 @@ extension Package.Dependency {
120
120
#endif
121
121
}
122
122
123
- /// Add a package dependency starting with a specific minimum version, up to
123
+ /// Adds a package dependency starting with a specific minimum version, up to
124
124
/// but not including a specified maximum version.
125
125
///
126
- /// The following example allows the Swift package manager to pick
126
+ /// The following example allows the Swift Package Manager to pick
127
127
/// versions `1.2.3`, `1.2.4`, `1.2.5`, but not `1.2.6`.
128
128
///
129
129
/// .package(url: "https://example.com/example-package.git", "1.2.3"..<"1.2.6"),
130
130
///
131
131
/// - Parameters:
132
- /// - name: The name of the package, or nil to deduce it from the URL.
132
+ /// - name: The name of the package, or ` nil` to deduce it from the URL.
133
133
/// - url: The valid Git URL of the package.
134
134
/// - range: The custom version range requirement.
135
135
@available ( _PackageDescription, introduced: 5.2 )
@@ -145,16 +145,16 @@ extension Package.Dependency {
145
145
#endif
146
146
}
147
147
148
- /// Add a package dependency starting with a specific minimum version, going
148
+ /// Adds a package dependency starting with a specific minimum version, going
149
149
/// up to and including a specific maximum version.
150
150
///
151
- /// The following example allows the Swift package manager to pick
151
+ /// The following example allows the Swift Package Manager to pick
152
152
/// versions 1.2.3, 1.2.4, 1.2.5, as well as 1.2.6.
153
153
///
154
154
/// .package(url: "https://example.com/example-package.git", "1.2.3"..."1.2.6"),
155
155
///
156
156
/// - Parameters:
157
- /// - name: The name of the package, or nil to deduce it from the URL.
157
+ /// - name: The name of the package, or ` nil` to deduce it from the URL.
158
158
/// - url: The valid Git URL of the package.
159
159
/// - range: The closed version range requirement.
160
160
@available ( _PackageDescription, obsoleted: 5.2 )
@@ -175,16 +175,16 @@ extension Package.Dependency {
175
175
#endif
176
176
}
177
177
178
- /// Add a package dependency starting with a specific minimum version, going
178
+ /// Adds a package dependency starting with a specific minimum version, going
179
179
/// up to and including a specific maximum version.
180
180
///
181
- /// The following example allows the Swift package manager to pick
181
+ /// The following example allows the Swift Package Manager to pick
182
182
/// versions 1.2.3, 1.2.4, 1.2.5, as well as 1.2.6.
183
183
///
184
184
/// .package(url: "https://example.com/example-package.git", "1.2.3"..."1.2.6"),
185
185
///
186
186
/// - Parameters:
187
- /// - name: The name of the package, or nil to deduce it from the URL.
187
+ /// - name: The name of the package, or ` nil` to deduce it from the URL.
188
188
/// - url: The valid Git URL of the package.
189
189
/// - range: The closed version range requirement.
190
190
@available ( _PackageDescription, introduced: 5.2 )
@@ -207,7 +207,7 @@ extension Package.Dependency {
207
207
}
208
208
209
209
#if !PACKAGE_DESCRIPTION_4
210
- /// Add a dependency to a local package on the filesystem.
210
+ /// Adds a package dependency to a local package on the filesystem.
211
211
///
212
212
/// The Swift Package Manager uses the package dependency as-is
213
213
/// and does not perform any source control access. Local package dependencies
@@ -222,14 +222,16 @@ extension Package.Dependency {
222
222
return . init( name: nil , url: path, requirement: . _localPackageItem)
223
223
}
224
224
225
- /// Add a dependency to a local package on the filesystem.
225
+ /// Adds a package dependency to a local package on the filesystem.
226
226
///
227
227
/// The Swift Package Manager uses the package dependency as-is
228
- /// and does not perform any source control access. Local package dependencies
228
+ /// and doesn't perform any source control access. Local package dependencies
229
229
/// are especially useful during development of a new package or when working
230
230
/// on multiple tightly coupled packages.
231
231
///
232
- /// - Parameter path: The path of the package.
232
+ /// - Parameters
233
+ /// - name: The name of the Swift package or `nil` to deduce the name from path.
234
+ /// - path: The local path to the package.
233
235
@available ( _PackageDescription, introduced: 5.2 )
234
236
public static func package (
235
237
name: String ? = nil ,
0 commit comments