UNPKG

3.15 kBPlain TextView Raw
1require "json"
2
3package = JSON.parse(File.read(File.join(__dir__, "package.json")))
4
5reactVersion = '0.0.0'
6
7begin
8 reactVersion = JSON.parse(File.read(File.join(__dir__, "..", "react-native", "package.json")))["version"]
9rescue
10 reactVersion = '0.64.0'
11end
12
13rnVersion = reactVersion.split('.')[1]
14
15folly_prefix = ""
16if rnVersion.to_i >= 64
17 folly_prefix = "RCT-"
18end
19
20
21folly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -DRNVERSION=' + rnVersion
22folly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
23folly_version = '2020.01.13.00'
24boost_compiler_flags = '-Wno-documentation'
25
26Pod::Spec.new do |s|
27 s.name = "RNReanimated"
28 s.version = package["version"]
29 s.summary = package["description"]
30 s.description = <<-DESC
31 RNReanimated
32 DESC
33 s.homepage = "https://github.com/software-mansion/react-native-reanimated"
34 s.license = "MIT"
35 # s.license = { :type => "MIT", :file => "FILE_LICENSE" }
36 s.author = { "author" => "author@domain.cn" }
37 s.platforms = { :ios => "9.0", :tvos => "9.0" }
38 s.source = { :git => "https://github.com/software-mansion/react-native-reanimated.git", :tag => "#{s.version}" }
39
40 s.source_files = [
41 "ios/**/*.{mm,h,m}",
42 "Common/cpp/**/*.cpp",
43 "Common/cpp/headers/**/*.h"
44 ]
45
46 s.preserve_paths = [
47 "Common/cpp/hidden_headers/**"
48 ]
49
50 s.pod_target_xcconfig = {
51 "USE_HEADERMAP" => "YES",
52 "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_TARGET_SRCROOT)\" \"$(PODS_ROOT)/#{folly_prefix}Folly\" \"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\" "
53 }
54 s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
55 s.xcconfig = {
56 "CLANG_CXX_LANGUAGE_STANDARD" => "c++14",
57 "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/#{folly_prefix}Folly\"",
58 "OTHER_CFLAGS" => "$(inherited)" + " " + folly_flags }
59
60 s.requires_arc = true
61
62 s.dependency "React"
63 s.dependency 'FBLazyVector'
64 s.dependency 'FBReactNativeSpec'
65 s.dependency 'RCTRequired'
66 s.dependency 'RCTTypeSafety'
67 s.dependency 'React-Core'
68 s.dependency 'React-CoreModules'
69 s.dependency 'React-Core/DevSupport'
70 s.dependency 'React-RCTActionSheet'
71 s.dependency 'React-RCTNetwork'
72 s.dependency 'React-RCTAnimation'
73 s.dependency 'React-RCTLinking'
74 s.dependency 'React-RCTBlob'
75 s.dependency 'React-RCTSettings'
76 s.dependency 'React-RCTText'
77 s.dependency 'React-RCTVibration'
78 s.dependency 'React-RCTImage'
79 s.dependency 'React-Core/RCTWebSocket'
80 s.dependency 'React-cxxreact'
81 s.dependency 'React-jsi'
82 s.dependency 'React-jsiexecutor'
83 s.dependency 'React-jsinspector'
84 s.dependency 'ReactCommon/turbomodule/core'
85 s.dependency 'Yoga'
86 s.dependency 'DoubleConversion'
87 s.dependency 'glog'
88
89 if reactVersion.match(/^0.62/)
90 s.dependency 'ReactCommon/callinvoker'
91 else
92 s.dependency 'React-callinvoker'
93 end
94
95 s.dependency "#{folly_prefix}Folly"
96
97end
98