Skip to content

Commit

Permalink
Merge pull request #112 from barakwei/feature/swift-package-proudct-p…
Browse files Browse the repository at this point in the history
…lugin-fix

xcodeproj_extensions: fix wrong serialization with swift package target.
  • Loading branch information
barakwei authored Dec 29, 2023
2 parents 04e48f0 + d6e638b commit 39e30cf
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions lib/kintsugi/xcodeproj_extensions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,17 @@ def to_tree_hash
hash
end
end

# By default, for this type, the `display_name` is used when calling `ascii_plist_annotation` (which is used
# to serialize the project to disk). In the case where the `display_name` contains a "plugin:" prefix, which
# means that the package is a plugin, the prefix is ommitted so just the package name is used.
# This, of course can be implemented in a better way, like adding a field to this object as plugin, marking it
# as a plugin, but this is a very simple way to achieve the desired result.
class XCSwiftPackageProductDependency
def ascii_plist_annotation
" #{display_name.delete_prefix("plugin:")} "
end
end
end
end

Expand Down

0 comments on commit 39e30cf

Please sign in to comment.