@@ -23,7 +23,7 @@ extension Package {
23
23
/// If you add the Swift package as a package dependency to an app for an Apple platform,
24
24
/// you can find the `Package.resolved` file inside your `.xcodeproj` or `.xcworkspace`.
25
25
public class Dependency : Encodable {
26
-
26
+ @ available ( _PackageDescription , introduced : 999 )
27
27
public enum Kind : Encodable {
28
28
case fileSystem( name: String ? , path: String )
29
29
case sourceControl( name: String ? , location: String , requirement: SourceControlRequirement )
@@ -33,8 +33,8 @@ extension Package {
33
33
@available ( _PackageDescription, introduced: 999 )
34
34
public let kind : Kind
35
35
36
- /// The name of the package , or `nil` to deduce the name using the package's Git URL.
37
- @available ( * , deprecated, message: " use kind instead " )
36
+ /// The name of the dependency , or `nil` to deduce the name using the package's Git URL.
37
+ @available ( _PackageDescription , deprecated: 999 , message: " use kind instead " )
38
38
public var name : String ? {
39
39
get {
40
40
switch self . kind {
@@ -48,7 +48,8 @@ extension Package {
48
48
}
49
49
}
50
50
51
- @available ( * , deprecated, message: " use kind instead " )
51
+ /// The location of the dependency.
52
+ @available ( _PackageDescription, deprecated: 999 , message: " use kind instead " )
52
53
public var url : String ? {
53
54
get {
54
55
switch self . kind {
@@ -62,8 +63,8 @@ extension Package {
62
63
}
63
64
}
64
65
65
- /// The dependency requirement of the package dependency.
66
- @available ( * , deprecated, message: " use kind instead " )
66
+ /// The requirement of the dependency.
67
+ @available ( _PackageDescription , deprecated: 999 , message: " use kind instead " )
67
68
public var requirement : Requirement {
68
69
get {
69
70
switch self . kind {
@@ -108,23 +109,18 @@ extension Package {
108
109
}
109
110
}
110
111
111
- @available ( _PackageDescription, introduced: 999 )
112
112
init ( kind: Kind ) {
113
113
self . kind = kind
114
114
}
115
115
116
- @available ( _PackageDescription, introduced: 999 )
117
116
convenience init ( name: String ? , path: String ) {
118
117
self . init ( kind: . fileSystem( name: name, path: path) )
119
118
}
120
119
121
- @available ( _PackageDescription, introduced: 999 )
122
120
convenience init ( name: String ? , location: String , requirement: SourceControlRequirement ) {
123
121
self . init ( kind: . sourceControl( name: name, location: location, requirement: requirement) )
124
122
}
125
123
126
- /// Initializes and returns a newly allocated requirement with the specified identity and requirements.
127
- @available ( _PackageDescription, introduced: 999 )
128
124
convenience init ( identity: String , requirement: RegistryRequirement ) {
129
125
self . init ( kind: . registry( identity: identity, requirement: requirement) )
130
126
}
0 commit comments