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_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
|
20 | folly_version = '2018.10.22.00'
|
21 | boost_compiler_flags = '-Wno-documentation'
|
22 |
|
23 | Pod::Spec.new do |s|
|
24 | s.name = "ReactCommon"
|
25 | s.module_name = "ReactCommon"
|
26 | s.version = version
|
27 | s.summary = "-"
|
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.header_dir = "ReactCommon"
|
34 | s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
35 | s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost-for-react-native\" \"$(PODS_ROOT)/Folly\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/Headers/Private/React-Core\"",
|
36 | "USE_HEADERMAP" => "YES",
|
37 | "CLANG_CXX_LANGUAGE_STANDARD" => "c++14" }
|
38 |
|
39 | s.subspec "callinvoker" do |ss|
|
40 | ss.source_files = "callinvoker/**/*.{cpp,h}"
|
41 |
|
42 | ss.dependency "React-cxxreact", version
|
43 | ss.dependency "DoubleConversion"
|
44 | ss.dependency "Folly", folly_version
|
45 | ss.dependency "glog"
|
46 | end
|
47 |
|
48 | s.subspec "turbomodule" do |ss|
|
49 | ss.dependency "ReactCommon/callinvoker", version
|
50 | ss.dependency "React-Core", version
|
51 | ss.dependency "React-cxxreact", version
|
52 | ss.dependency "React-jsi", version
|
53 | ss.dependency "Folly", folly_version
|
54 | ss.dependency "DoubleConversion"
|
55 | ss.dependency "glog"
|
56 |
|
57 | ss.subspec "core" do |sss|
|
58 | sss.source_files = "turbomodule/core/*.{cpp,h}",
|
59 | "turbomodule/core/platform/ios/*.{mm,cpp,h}"
|
60 | end
|
61 |
|
62 | ss.subspec "samples" do |sss|
|
63 | sss.source_files = "turbomodule/samples/*.{cpp,h}",
|
64 | "turbomodule/samples/platform/ios/*.{mm,cpp,h}"
|
65 | sss.dependency "ReactCommon/turbomodule/core", version
|
66 | end
|
67 | end
|
68 | end
|