Commit c1d4e4b9 by Hannah Shi Committed by Copybara-Service

PR #1643: add xcprivacy to all subspecs

Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1643

Addressing comments at https://github.com/abseil/abseil-cpp/pull/1604/#pullrequestreview-1937008657
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 4405cdfe71129bebb13c02a6d8ee18be7e813f73 into 4539c540

Merging this change closes #1643

COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1643 from HannahShiSFB:privacy-manifests 4405cdfe71129bebb13c02a6d8ee18be7e813f73
PiperOrigin-RevId: 616914674
Change-Id: If56d5a4f1a7cc6f9fac7a2d8e95b55d140e645fc
parent 50a88673
...@@ -47,6 +47,11 @@ Pod::Spec.new do |s| ...@@ -47,6 +47,11 @@ Pod::Spec.new do |s|
s.osx.deployment_target = '10.11' s.osx.deployment_target = '10.11'
s.tvos.deployment_target = '9.0' s.tvos.deployment_target = '9.0'
s.watchos.deployment_target = '2.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. # Rule object representing the rule of Bazel BUILD.
...@@ -191,6 +196,12 @@ def write_podspec_rule(f, rule, depth): ...@@ -191,6 +196,12 @@ def write_podspec_rule(f, rule, depth):
name = get_spec_name(dep.replace(":", "/")) name = get_spec_name(dep.replace(":", "/"))
f.write("{indent}{var}.dependency '{dep}'\n".format( f.write("{indent}{var}.dependency '{dep}'\n".format(
indent=indent, var=spec_var, dep=name)) 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): def write_indented_list(f, leading, values):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment