forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
React.podspec
242 lines (209 loc) · 9.71 KB
/
React.podspec
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
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'
Pod::Spec.new do |s|
s.name = "React"
s.version = version
s.summary = package["description"]
s.description = <<-DESC
React Native apps are built using the React JS
framework, and render directly to native UIKit
elements using a fully asynchronous architecture.
There is no browser and no HTML. We have picked what
we think is the best set of features from these and
other technologies to build what we hope to become
the best product development framework available,
with an emphasis on iteration speed, developer
delight, continuity of technology, and absolutely
beautiful and fast products with no compromises in
quality or capability.
DESC
s.homepage = "http://facebook.github.io/react-native/"
s.license = package["license"]
s.author = "Facebook"
s.source = source
s.default_subspec = "Core"
s.requires_arc = true
s.platforms = { :ios => "8.0", :tvos => "9.2" }
s.pod_target_xcconfig = { "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
s.preserve_paths = "package.json", "LICENSE", "LICENSE-docs", "PATENTS"
s.cocoapods_version = ">= 1.2.0"
s.subspec "Core" do |ss|
ss.dependency "yoga", "#{package["version"]}.React"
ss.source_files = "React/**/*.{c,h,m,mm,S,cpp}"
ss.exclude_files = "**/__tests__/*",
"IntegrationTests/*",
"React/DevSupport/*",
"React/Inspector/*",
"ReactCommon/yoga/*",
"React/Cxx*/*",
"React/Base/RCTBatchedBridge.mm",
"React/Executors/*"
ss.ios.exclude_files = "React/**/RCTTV*.*"
ss.tvos.exclude_files = "React/Modules/RCTClipboard*",
"React/Views/RCTDatePicker*",
"React/Views/RCTPicker*",
"React/Views/RCTRefreshControl*",
"React/Views/RCTSlider*",
"React/Views/RCTSwitch*",
"React/Views/RCTWebView*"
ss.header_dir = "React"
ss.framework = "JavaScriptCore"
ss.libraries = "stdc++"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end
s.subspec "BatchedBridge" do |ss|
ss.dependency "React/Core"
ss.dependency "React/cxxreact_legacy"
ss.source_files = "React/Base/RCTBatchedBridge.mm", "React/Executors/*"
end
s.subspec "CxxBridge" do |ss|
ss.dependency "Folly", "2016.09.26.00"
ss.dependency "React/Core"
ss.dependency "React/cxxreact"
ss.compiler_flags = folly_compiler_flags
ss.private_header_files = "React/Cxx*/*.h"
ss.source_files = "React/Cxx*/*.{h,m,mm}"
end
s.subspec "DevSupport" do |ss|
ss.dependency "React/Core"
ss.dependency "React/RCTWebSocket"
ss.source_files = "React/DevSupport/*",
"React/Inspector/*"
end
s.subspec "tvOS" do |ss|
ss.dependency "React/Core"
ss.source_files = "React/**/RCTTV*.{h, m}"
end
s.subspec "jschelpers_legacy" do |ss|
ss.source_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper}.{cpp,h}", "ReactCommon/jschelpers/systemJSCWrapper.cpp"
ss.private_header_files = "ReactCommon/jschelpers/{JavaScriptCore,JSCWrapper}.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
ss.framework = "JavaScriptCore"
end
s.subspec "jsinspector_legacy" do |ss|
ss.source_files = "ReactCommon/jsinspector/{InspectorInterfaces}.{cpp,h}"
ss.private_header_files = "ReactCommon/jsinspector/{InspectorInterfaces}.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end
s.subspec "cxxreact_legacy" do |ss|
ss.dependency "React/jschelpers_legacy"
ss.dependency "React/jsinspector_legacy"
ss.source_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.{cpp,h}"
ss.private_header_files = "ReactCommon/cxxreact/{JSBundleType,oss-compat-util}.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end
s.subspec "jschelpers" do |ss|
ss.dependency "Folly", "2016.09.26.00"
ss.dependency "React/PrivateDatabase"
ss.compiler_flags = folly_compiler_flags
ss.source_files = "ReactCommon/jschelpers/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jschelpers/*.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
ss.framework = "JavaScriptCore"
end
s.subspec "jsinspector" do |ss|
ss.source_files = "ReactCommon/jsinspector/*.{cpp,h}"
ss.private_header_files = "ReactCommon/jsinspector/*.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end
s.subspec "PrivateDatabase" do |ss|
ss.source_files = "ReactCommon/privatedata/*.{cpp,h}"
ss.private_header_files = "ReactCommon/privatedata/*.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\"" }
end
s.subspec "cxxreact" do |ss|
ss.dependency "React/jschelpers"
ss.dependency "React/jsinspector"
ss.dependency "boost"
ss.dependency "Folly", "2016.09.26.00"
ss.compiler_flags = folly_compiler_flags
ss.source_files = "ReactCommon/cxxreact/*.{cpp,h}"
ss.exclude_files = "ReactCommon/cxxreact/SampleCxxModule.*"
ss.private_header_files = "ReactCommon/cxxreact/*.h"
ss.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Folly\"" }
end
s.subspec "ART" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/ART/**/*.{h,m}"
end
s.subspec "RCTActionSheet" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/ActionSheetIOS/*.{h,m}"
end
s.subspec "RCTAnimation" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/NativeAnimation/{Drivers/*,Nodes/*,*}.{h,m}"
ss.header_dir = "RCTAnimation"
end
s.subspec "RCTBlob" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/Blob/*.{h,m}"
ss.preserve_paths = "Libraries/Blob/*.js"
end
s.subspec "RCTCameraRoll" do |ss|
ss.dependency "React/Core"
ss.dependency 'React/RCTImage'
ss.source_files = "Libraries/CameraRoll/*.{h,m}"
end
s.subspec "RCTGeolocation" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/Geolocation/*.{h,m}"
end
s.subspec "RCTImage" do |ss|
ss.dependency "React/Core"
ss.dependency "React/RCTNetwork"
ss.source_files = "Libraries/Image/*.{h,m}"
end
s.subspec "RCTNetwork" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/Network/*.{h,m,mm}"
end
s.subspec "RCTPushNotification" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/PushNotificationIOS/*.{h,m}"
end
s.subspec "RCTSettings" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/Settings/*.{h,m}"
end
s.subspec "RCTText" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/Text/*.{h,m}"
end
s.subspec "RCTVibration" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/Vibration/*.{h,m}"
end
s.subspec "RCTWebSocket" do |ss|
ss.dependency "React/Core"
ss.dependency "React/RCTBlob"
ss.dependency "React/fishhook"
ss.source_files = "Libraries/WebSocket/*.{h,m}"
end
s.subspec "fishhook" do |ss|
ss.header_dir = "fishhook"
ss.source_files = "Libraries/fishhook/*.{h,c}"
end
s.subspec "RCTLinkingIOS" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/LinkingIOS/*.{h,m}"
end
s.subspec "RCTTest" do |ss|
ss.dependency "React/Core"
ss.source_files = "Libraries/RCTTest/**/*.{h,m}"
ss.frameworks = "XCTest"
end
s.subspec "_ignore_me_subspec_for_linting_" do |ss|
ss.dependency "React/Core"
ss.dependency "React/CxxBridge"
end
end