-
-
Notifications
You must be signed in to change notification settings - Fork 320
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Build Tool Plugin Support #733
Changes from 3 commits
c872e5f
2d98d52
10d0d4a
17d6f72
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,13 +17,17 @@ public class XCSwiftPackageProductDependency: PBXContainerItem, PlistSerializabl | |
packageReference = newValue?.reference | ||
} | ||
} | ||
|
||
let plugin: Bool | ||
|
||
// MARK: - Init | ||
|
||
public init(productName: String, | ||
package: XCRemoteSwiftPackageReference? = nil) { | ||
self.productName = productName | ||
package: XCRemoteSwiftPackageReference? = nil, | ||
plugin: Bool) { | ||
self.productName = "\(plugin ? "plugin:" : "")\(productName)" | ||
packageReference = package?.reference | ||
self.plugin = plugin | ||
super.init() | ||
} | ||
|
||
|
@@ -37,6 +41,11 @@ public class XCSwiftPackageProductDependency: PBXContainerItem, PlistSerializabl | |
} else { | ||
packageReference = nil | ||
} | ||
if let plugin = try container.decodeIfPresent(Bool.self, forKey: .plugin) { | ||
self.plugin = plugin | ||
} else { | ||
plugin = false | ||
} | ||
Comment on lines
+44
to
+48
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. if I followed along, there isn't a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kwridan Good point! I just realized that I completely misunderstood what this initializer is for. My bad π€¦ββοΈ There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. no worries |
||
try super.init(from: decoder) | ||
} | ||
|
||
|
@@ -57,6 +66,7 @@ public class XCSwiftPackageProductDependency: PBXContainerItem, PlistSerializabl | |
fileprivate enum CodingKeys: String, CodingKey { | ||
case productName | ||
case package | ||
case plugin | ||
} | ||
|
||
override func isEqual(to object: Any?) -> Bool { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to make this change non source breaking, can I trouble you to default the
plugin
parameter value?