Create a CSSLayout subspec that preserves the header directories
Summary: RN imports CSSLayout files like so: `#import <CSSLayout/CSSLayout.h>`, so we need to tell CocoaPods to preserve the directory structure for CSSLayout files. This is done with the header_mappings_dir, but we want it to apply just to CSSLayout's files, hence the subspec. Closes https://github.com/facebook/react-native/pull/9015 Differential Revision: D3621727 fbshipit-source-id: fb3603a0820ca3d6502813204ff215cf160b1955
This commit is contained in:
parent
481e1c77a0
commit
ee89ffcb17
|
@ -29,8 +29,9 @@ Pod::Spec.new do |s|
|
||||||
s.preserve_paths = "cli.js", "Libraries/**/*.js", "lint", "linter.js", "node_modules", "package.json", "packager", "PATENTS", "react-native-cli"
|
s.preserve_paths = "cli.js", "Libraries/**/*.js", "lint", "linter.js", "node_modules", "package.json", "packager", "PATENTS", "react-native-cli"
|
||||||
|
|
||||||
s.subspec 'Core' do |ss|
|
s.subspec 'Core' do |ss|
|
||||||
|
ss.dependency 'React/CSSLayout'
|
||||||
ss.source_files = "React/**/*.{c,h,m,mm,S}"
|
ss.source_files = "React/**/*.{c,h,m,mm,S}"
|
||||||
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*"
|
ss.exclude_files = "**/__tests__/*", "IntegrationTests/*", "React/CSSLayout/*"
|
||||||
ss.frameworks = "JavaScriptCore"
|
ss.frameworks = "JavaScriptCore"
|
||||||
ss.libraries = "stdc++"
|
ss.libraries = "stdc++"
|
||||||
ss.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
|
ss.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
|
||||||
|
@ -42,6 +43,11 @@ Pod::Spec.new do |s|
|
||||||
ss.preserve_paths = "Libraries/ART/**/*.js"
|
ss.preserve_paths = "Libraries/ART/**/*.js"
|
||||||
end
|
end
|
||||||
|
|
||||||
|
s.subspec 'CSSLayout' do |ss|
|
||||||
|
ss.source_files = "React/CSSLayout/**/*.{c,h}"
|
||||||
|
ss.header_mappings_dir = "React"
|
||||||
|
end
|
||||||
|
|
||||||
s.subspec 'RCTActionSheet' do |ss|
|
s.subspec 'RCTActionSheet' do |ss|
|
||||||
ss.dependency 'React/Core'
|
ss.dependency 'React/Core'
|
||||||
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
|
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
|
||||||
|
|
Loading…
Reference in New Issue