1*fe5cfb17STomasz Sapeta# Copyright (c) Meta Platforms, Inc. and affiliates.
2*fe5cfb17STomasz Sapeta#
3*fe5cfb17STomasz Sapeta# This source code is licensed under the MIT license found in the
4*fe5cfb17STomasz Sapeta# LICENSE file in the root directory of this source tree.
5*fe5cfb17STomasz Sapeta
6*fe5cfb17STomasz Sapetarequire "json"
7*fe5cfb17STomasz Sapeta
8*fe5cfb17STomasz Sapetapackage = JSON.parse(File.read(File.join(__dir__, "..", "package.json")))
9*fe5cfb17STomasz Sapetaversion = package['version']
10*fe5cfb17STomasz Sapeta
11*fe5cfb17STomasz Sapeta
12*fe5cfb17STomasz Sapeta
13*fe5cfb17STomasz Sapetafolly_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1'
14*fe5cfb17STomasz Sapetafolly_compiler_flags = folly_flags + ' ' + '-Wno-comma -Wno-shorten-64-to-32'
15*fe5cfb17STomasz Sapetafolly_version = '2021.07.22.00'
16*fe5cfb17STomasz Sapetaboost_compiler_flags = '-Wno-documentation'
17*fe5cfb17STomasz Sapeta
18*fe5cfb17STomasz SapetaPod::Spec.new do |s|
19*fe5cfb17STomasz Sapeta  s.name                   = "ABI48_0_0React-RCTFabric"
20*fe5cfb17STomasz Sapeta  s.version                = version
21*fe5cfb17STomasz Sapeta  s.summary                = "RCTFabric for React Native."
22*fe5cfb17STomasz Sapeta  s.homepage               = "https://reactnative.dev/"
23*fe5cfb17STomasz Sapeta  s.license                = package["license"]
24*fe5cfb17STomasz Sapeta  s.author                 = "Facebook, Inc. and its affiliates"
25*fe5cfb17STomasz Sapeta  s.platforms              = { :ios => "12.4" }
26*fe5cfb17STomasz Sapeta  s.source                 = { :path => "." }
27*fe5cfb17STomasz Sapeta  s.source_files           = "Fabric/**/*.{c,h,m,mm,S,cpp}"
28*fe5cfb17STomasz Sapeta  s.exclude_files          = "**/tests/*",
29*fe5cfb17STomasz Sapeta                             "**/android/*",
30*fe5cfb17STomasz Sapeta  s.compiler_flags         = folly_compiler_flags + ' ' + boost_compiler_flags
31*fe5cfb17STomasz Sapeta  s.header_dir             = "ABI48_0_0React"
32*fe5cfb17STomasz Sapeta  s.module_name            = "ABI48_0_0RCTFabric"
33*fe5cfb17STomasz Sapeta  s.framework              = "JavaScriptCore"
34*fe5cfb17STomasz Sapeta  s.pod_target_xcconfig    = { "HEADER_SEARCH_PATHS" => "\"$(PODS_TARGET_SRCROOT)/ReactCommon\" \"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/DoubleConversion\" \"$(PODS_ROOT)/RCT-Folly\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"$(PODS_ROOT)/Headers/Public/React-Codegen\" \"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\"" }
35*fe5cfb17STomasz Sapeta  s.xcconfig               = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/glog\" \"$(PODS_ROOT)/RCT-Folly\"", "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
36*fe5cfb17STomasz Sapeta                               "OTHER_CFLAGS" => "$(inherited) -DRN_FABRIC_ENABLED" + " " + folly_flags  }
37*fe5cfb17STomasz Sapeta
38*fe5cfb17STomasz Sapeta  s.dependency "ABI48_0_0React-Core", version
39*fe5cfb17STomasz Sapeta  s.dependency "ABI48_0_0React-Fabric", version
40*fe5cfb17STomasz Sapeta  s.dependency "ABI48_0_0React-RCTImage", version
41*fe5cfb17STomasz Sapeta  s.dependency "RCT-Folly/Fabric", folly_version
42*fe5cfb17STomasz Sapeta
43*fe5cfb17STomasz Sapeta  s.test_spec 'Tests' do |test_spec|
44*fe5cfb17STomasz Sapeta    test_spec.source_files = "Tests/**/*.{mm}"
45*fe5cfb17STomasz Sapeta    test_spec.framework = "XCTest"
46*fe5cfb17STomasz Sapeta  end
47*fe5cfb17STomasz Sapetaend
48