1# Copyright (c) Meta Platforms, Inc. and affiliates.
2#
3# This source code is licensed under the MIT license found in the
4# LICENSE file in the root directory of this source tree.
5
6require "json"
7
8react_native_path = "../.."
9require_relative "#{react_native_path}/scripts/react_native_pods.rb"
10
11package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
12version = package['version']
13
14
15
16folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
17folly_version = '2021.07.22.00'
18
19Pod::Spec.new do |s|
20  s.name                   = "ABI47_0_0FBReactNativeSpec"
21  s.version                = version
22  s.summary                = "-"  # TODO
23  s.homepage               = "https://reactnative.dev/"
24  s.license                = package["license"]
25  s.author                 = "Facebook, Inc. and its affiliates"
26  s.platforms              = { :ios => "12.4" }
27  s.compiler_flags         = folly_compiler_flags + ' -Wno-nullability-completeness'
28  s.source                 = { :path => "." }
29  # This podspec is used to trigger the codegen, and built files are generated in a different location.
30  # We don't want this pod to actually include any files.
31  s.header_dir             = "ABI47_0_0FBReactNativeSpec"
32
33  s.pod_target_xcconfig    = {
34                               "USE_HEADERMAP" => "YES",
35                               "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
36                               "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/RCT-Folly\""
37                             }
38
39  s.dependency "RCT-Folly", folly_version
40  s.dependency "ABI47_0_0RCTRequired", version
41  s.dependency "ABI47_0_0RCTTypeSafety", version
42  s.dependency "ABI47_0_0React-Core", version
43  s.dependency "ABI47_0_0React-jsi", version
44  s.dependency "ABI47_0_0ReactCommon/turbomodule/core", version
45end
46