1 |
|
2 |
|
3 |
|
4 |
|
5 |
|
6 | require "json"
|
7 |
|
8 | package = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
|
9 | version = package['version']
|
10 |
|
11 | source = { :git => 'https://github.com/facebook/react-native.git' }
|
12 | if version == '1000.0.0'
|
13 |
|
14 | source[:commit] = `git rev-parse HEAD`.strip
|
15 | else
|
16 | source[:tag] = "v#{version}"
|
17 | end
|
18 |
|
19 | folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
|
20 | folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
|
21 | folly_version = '2018.10.22.00'
|
22 | boost_compiler_flags = '-Wno-documentation'
|
23 |
|
24 | Pod::Spec.new do |s|
|
25 | s.name = "React-RCTFabric"
|
26 | s.version = version
|
27 | s.summary = "RCTFabric for React Native."
|
28 | s.homepage = "http://facebook.github.io/react-native/"
|
29 | s.license = package["license"]
|
30 | s.author = "Facebook, Inc. and its affiliates"
|
31 | s.platforms = { :ios => "9.0", :tvos => "9.2" }
|
32 | s.source = source
|
33 | s.source_files = "Fabric/**/*.{c,h,m,mm,S,cpp}"
|
34 | s.exclude_files = "**/tests/*",
|
35 | "**/android/*",
|
36 | s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
37 | s.header_dir = "React"
|
38 | s.framework = "JavaScriptCore"
|
39 | s.library = "stdc++"
|
40 | s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\"" }
|
41 | s.xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/Folly\"",
|
42 | "OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" + " " + folly_flags }
|
43 |
|
44 | s.dependency "React-Core", version
|
45 | s.dependency "React-Fabric", version
|
46 | s.dependency "React-RCTImage", version
|
47 | s.dependency "Folly/Fabric", folly_version
|
48 | end
|