Skip to content

Commit

Permalink
PR abseil#1643: add xcprivacy to all subspecs
Browse files Browse the repository at this point in the history
Imported from GitHub PR abseil#1643

Addressing comments at abseil#1604
Add a xcprivacy subspec and have all other subspecs depend on it (option 1)

Didn't going with option 3 because there are several levels of subspecs in abseil podspec, it's difficult to track whether all of them directly or indirectly depends on abseil/base/config or ensure they will continue to depend on it.

Example of generated podsped: https://gist.github.com/HannahShiSFB/15d8fb6aa637f2781b7be4218d080f11
Merge 4405cdf into 4539c54

Merging this change closes abseil#1643

COPYBARA_INTEGRATE_REVIEW=abseil#1643 from HannahShiSFB:privacy-manifests 4405cdf
PiperOrigin-RevId: 616914674
Change-Id: If56d5a4f1a7cc6f9fac7a2d8e95b55d140e645fc
  • Loading branch information
HannahShiSFB authored and netkex committed Apr 3, 2024
1 parent 3c93663 commit 40900d0
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions absl/abseil.podspec.gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
s.osx.deployment_target = '10.11'
s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.0'
s.subspec 'xcprivacy' do |ss|
ss.resource_bundles = {
ss.module_name => 'PrivacyInfo.xcprivacy',
}
end
"""

# Rule object representing the rule of Bazel BUILD.
Expand Down Expand Up @@ -191,6 +196,12 @@ def write_podspec_rule(f, rule, depth):
name = get_spec_name(dep.replace(":", "/"))
f.write("{indent}{var}.dependency '{dep}'\n".format(
indent=indent, var=spec_var, dep=name))
# Writes dependency to xcprivacy
f.write(
"{indent}{var}.dependency '{dep}'\n".format(
indent=indent, var=spec_var, dep="abseil/xcprivacy"
)
)


def write_indented_list(f, leading, values):
Expand Down

0 comments on commit 40900d0

Please sign in to comment.