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
8package = JSON.parse(File.read(File.join(__dir__, "..", "..", "package.json")))
9version = package['version']
10
11
12
13folly_compiler_flags = '-DFOLLY_NO_CONFIG -DFOLLY_MOBILE=1 -DFOLLY_USE_LIBCPP=1 -Wno-comma -Wno-shorten-64-to-32'
14folly_version = '2021.07.22.00'
15
16header_search_paths = [
17  "\"$(PODS_ROOT)/RCT-Folly\"",
18  "\"${PODS_ROOT}/Headers/Public/React-Codegen/react/renderer/components\"",
19  "\"${PODS_CONFIGURATION_BUILD_DIR}/React-Codegen/React_Codegen.framework/Headers\""
20]
21
22if ENV["USE_FRAMEWORKS"]
23  header_search_paths = header_search_paths.concat([
24    "\"$(PODS_CONFIGURATION_BUILD_DIR)/ReactCommon/ReactCommon.framework/Headers/react/nativemodule/core\"",
25    "\"$(PODS_CONFIGURATION_BUILD_DIR)/React-NativeModulesApple/React_NativeModulesApple.framework/Headers\""
26  ])
27end
28
29Pod::Spec.new do |s|
30  s.name                   = "ABI49_0_0React-RCTAnimation"
31  s.version                = version
32  s.summary                = "A native driver for the Animated API."
33  s.homepage               = "https://reactnative.dev/"
34  s.license                = package["license"]
35  s.author                 = "Meta Platforms, Inc. and its affiliates"
36  s.platforms              = { :ios => "12.4" }
37  s.compiler_flags         = folly_compiler_flags + ' -Wno-nullability-completeness'
38  s.source                 = { :path => "." }
39  s.source_files           = "**/*.{h,m,mm}"
40  s.preserve_paths         = "package.json", "LICENSE", "LICENSE-docs"
41  s.header_dir             = "ABI49_0_0RCTAnimation"
42  s.pod_target_xcconfig    = {
43                               "USE_HEADERMAP" => "YES",
44                               "CLANG_CXX_LANGUAGE_STANDARD" => "c++17",
45                               "HEADER_SEARCH_PATHS" => header_search_paths.join(" ")
46                             }
47
48  s.dependency "RCT-Folly", folly_version
49  s.dependency "ABI49_0_0React-Codegen", version
50  s.dependency "ABI49_0_0RCTTypeSafety", version
51  s.dependency "ABI49_0_0ReactCommon/turbomodule/core", version
52  s.dependency "ABI49_0_0React-jsi", version
53  s.dependency "ABI49_0_0React-Core/RCTAnimationHeaders", version
54  s.dependency "ABI49_0_0React-NativeModulesApple", version
55end
56