Skip to content

Commit 838d26d

Browse files
rozelefacebook-github-bot
authored andcommitted
Invert podspec to allowlist platform files (#45734)
Summary: Pull Request resolved: #45734 Rather than enumerating all platforms the iOS podspec should not compile this inverts the source_files field to an allowlist for only files relevant to iOS. ## Changelog [Internal] Reviewed By: cipolleschi Differential Revision: D60291091 fbshipit-source-id: a0f7e3181ec527e39602c4523622f836a04183d9
1 parent e92ae77 commit 838d26d

2 files changed

Lines changed: 2 additions & 7 deletions

File tree

packages/react-native/ReactCommon/React-Fabric.podspec

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,7 @@ Pod::Spec.new do |s|
142142
sss.dependency folly_dep_name, folly_version
143143
sss.dependency "Yoga"
144144
sss.compiler_flags = folly_compiler_flags
145-
sss.source_files = "react/renderer/components/view/**/*.{m,mm,cpp,h}"
146-
sss.exclude_files = "react/renderer/components/view/tests", "react/renderer/components/view/platform/android", "react/renderer/components/view/platform/windows"
145+
sss.source_files = "react/renderer/components/view/*.{m,mm,cpp,h}"
147146
sss.header_dir = "react/renderer/components/view"
148147
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/Headers/Private/Yoga\"" }
149148
end

packages/react-native/ReactCommon/react/renderer/graphics/React-graphics.podspec

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ folly_version = folly_config[:version]
2323
boost_compiler_flags = '-Wno-documentation'
2424

2525
Pod::Spec.new do |s|
26-
source_files = "**/*.{m,mm,cpp,h}"
26+
source_files = "*.{m,mm,cpp,h}", "platform/ios/**/*.{mm,h}"
2727
header_search_paths = [
2828
"\"$(PODS_ROOT)/boost\"",
2929
"\"$(PODS_TARGET_SRCROOT)/../../../\"",
@@ -42,10 +42,6 @@ Pod::Spec.new do |s|
4242
s.source = source
4343
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
4444
s.source_files = source_files
45-
s.exclude_files = "tests",
46-
"platform/android",
47-
"platform/cxx",
48-
"platform/windows",
4945
s.header_dir = "react/renderer/graphics"
5046
s.framework = "UIKit"
5147

0 commit comments

Comments
 (0)