Skip to content

Commit

Permalink
Add processing for 'packageProductDependencies'
Browse files Browse the repository at this point in the history
  • Loading branch information
JanNash committed Nov 12, 2020
1 parent 2416f6a commit 9533101
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions xUnique.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,15 @@ def __unique_target(self, target_hex):
current_node = self.nodes[target_hex]
bcl_hex = current_node['buildConfigurationList']
self.__unique_build_configuration_list(target_hex, bcl_hex)

try:
package_product_dependency_list = current_node['packageProductDependencies']
if package_product_dependency_list:
for package_product_dependency_hex in package_product_dependency_list:
self.__unique_package_product_dependency(target_hex, package_product_dependency_hex)
except KeyError:
pass

dependencies_list = current_node.get('dependencies')
if dependencies_list:
self.vprint('uniquify PBXTargetDependency')
Expand Down Expand Up @@ -431,6 +440,13 @@ def __unique_target_dependency(self, parent_hex, target_dependency_hex):
raise XUniqueExit('PBXTargetDependency item "', target_dependency_hex,
'" is invalid due to lack of "targetProxy" attribute')

def __unique_package_product_dependency(self, parent_hex, package_product_dependency_hex):
"""XCSwiftPackageProductDependency"""
self.vprint('uniquify XCSwiftPackageProductDependency')
cur_path_key = 'isa'
self.vprint(package_product_dependency_hex)
self.__set_to_result(parent_hex, package_product_dependency_hex, cur_path_key)

def __unique_container_item_proxy(self, parent_hex, container_item_proxy_hex):
"""PBXContainerItemProxy"""
self.vprint('uniquify PBXContainerItemProxy')
Expand Down

0 comments on commit 9533101

Please sign in to comment.