forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathReact-Fabric.podspec
More file actions
258 lines (229 loc) · 12.5 KB
/
React-Fabric.podspec
File metadata and controls
258 lines (229 loc) · 12.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
require "json"
package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
version = package['version']
source = { :git => 'https://github.com/facebook/react-native.git' }
if version == '1000.0.0'
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
source[:commit] = `git rev-parse HEAD`.strip
else
source[:tag] = "v#{version}"
end
folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
folly_version = '2020.01.13.00'
folly_dep_name = 'Folly/Fabric'
boost_compiler_flags = '-Wno-documentation'
Pod::Spec.new do |s|
s.name = "React-Fabric"
s.version = version
s.summary = "Fabric for React Native."
s.homepage = "https://reactnative.dev/"
s.license = package["license"]
s.author = "Facebook, Inc. and its affiliates"
s.platforms = { :ios => "10.0", :tvos => "10.0" }
s.source = source
s.prepare_command = File.read("../scripts/generate-rncore.sh")
s.source_files = "dummyFile.cpp"
s.library = "stdc++"
s.pod_target_xcconfig = { "USE_HEADERMAP" => "YES",
"CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
s.dependency folly_dep_name, folly_version
s.dependency "React-graphics", version
s.dependency "React-jsiexecutor", version
s.dependency "RCTRequired", version
s.dependency "RCTTypeSafety", version
s.dependency "ReactCommon/turbomodule/core", version
s.dependency "React-jsi", version
s.subspec "attributedstring" do |ss|
ss.dependency folly_dep_name, folly_version
ss.compiler_flags = folly_compiler_flags
ss.source_files = "fabric/attributedstring/**/*.{m,mm,cpp,h}"
ss.exclude_files = "**/tests/*"
ss.header_dir = "react/attributedstring"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
s.subspec "better" do |ss|
ss.dependency folly_dep_name, folly_version
ss.compiler_flags = folly_compiler_flags
ss.source_files = "better/**/*.{m,mm,cpp,h}"
ss.exclude_files = "**/tests/*"
ss.header_dir = "better"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
s.subspec "config" do |ss|
ss.source_files = "config/*.{m,mm,cpp,h}"
ss.header_dir = "react/config"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end
s.subspec "core" do |ss|
ss.dependency folly_dep_name, folly_version
ss.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
ss.source_files = "fabric/core/**/*.{m,mm,cpp,h}"
ss.exclude_files = "**/tests/**/*"
ss.header_dir = "react/core"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
s.subspec "components" do |ss|
ss.subspec "activityindicator" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/activityindicator/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/activityindicator"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
ss.subspec "image" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/image/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/image"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
ss.subspec "legacyviewmanagerinterop" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/legacyviewmanagerinterop/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/legacyviewmanagerinterop"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\"" }
end
ss.subspec "modal" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/modal/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/modal"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
ss.subspec "rncore" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/rncore/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*", "fabric/components/rncore/*Tests.{h,cpp}",
# TODO: These should be re-enabled later when Codegen Native Module support is needed.
"fabric/components/rncore/rncore-generated.mm", "fabric/components/rncore/NativeModules.{h,cpp}"
sss.header_dir = "react/components/rncore"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
ss.subspec "root" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/root/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/root"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
ss.subspec "safeareaview" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/safeareaview/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/safeareaview"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
ss.subspec "scrollview" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/scrollview/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/scrollview"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
ss.subspec "slider" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/slider/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*",
"**/android/*"
sss.header_dir = "react/components/slider"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
ss.subspec "text" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/text/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/text"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
ss.subspec "textinput" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/textinput/iostextinput/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/iostextinput"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
ss.subspec "unimplementedview" do |sss|
sss.dependency folly_dep_name, folly_version
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/unimplementedview/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/unimplementedview"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
ss.subspec "view" do |sss|
sss.dependency folly_dep_name, folly_version
sss.dependency "Yoga"
sss.compiler_flags = folly_compiler_flags
sss.source_files = "fabric/components/view/**/*.{m,mm,cpp,h}"
sss.exclude_files = "**/tests/*"
sss.header_dir = "react/components/view"
sss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
end
s.subspec "debug" do |ss|
ss.dependency folly_dep_name, folly_version
ss.compiler_flags = folly_compiler_flags
ss.source_files = "fabric/debug/**/*.{m,mm,cpp,h}"
ss.exclude_files = "**/tests/*"
ss.header_dir = "react/debug"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
s.subspec "imagemanager" do |ss|
ss.dependency "React-RCTImage", version
ss.dependency folly_dep_name, folly_version
ss.compiler_flags = folly_compiler_flags
ss.source_files = "fabric/imagemanager/**/*.{m,mm,cpp,h}"
ss.exclude_files = "**/tests/*",
"**/android/*",
"**/cxx/*"
ss.header_dir = "react/imagemanager"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
s.subspec "mounting" do |ss|
ss.dependency folly_dep_name, folly_version
ss.compiler_flags = folly_compiler_flags
ss.source_files = "fabric/mounting/**/*.{m,mm,cpp,h}"
ss.exclude_files = "**/tests/*"
ss.header_dir = "react/mounting"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
s.subspec "textlayoutmanager" do |ss|
ss.dependency folly_dep_name, folly_version
ss.compiler_flags = folly_compiler_flags
ss.source_files = "fabric/textlayoutmanager/**/*.{m,mm,cpp,h}"
ss.exclude_files = "**/tests/*",
"**/android/*",
"**/cxx/*"
ss.header_dir = "react/textlayoutmanager"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
s.subspec "uimanager" do |ss|
ss.dependency folly_dep_name, folly_version
ss.compiler_flags = folly_compiler_flags
ss.source_files = "fabric/uimanager/**/*.{m,mm,cpp,h}"
ss.exclude_files = "**/tests/*",
ss.header_dir = "react/uimanager"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
s.subspec "utils" do |ss|
ss.source_files = "utils/*.{m,mm,cpp,h}"
ss.header_dir = "react/utils"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/Folly\"" }
end
end