mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: > [!NOTE] > This PR is part of JavaScriptCore Extraction to this repository: https://github.com/react-native-community/javascriptcore This PR adds `jsitooling` package that third party JS engines can use (in that case javascriptcore). It's required because React-Runtime needs to depend on third-party engine on iOS, and the third-party engine needed to depend on React-Runtime to get access to the `JSRuntimeFactory` and Cocoapods doesn't support circular dependencies... Now third-party engine can depenend on jsitooling package and provide JSRuntimeFactory ## Changelog: [INTERNAL] [ADDED] - jsitooling package Pull Request resolved: https://github.com/facebook/react-native/pull/49348 Test Plan: CI Green Reviewed By: cortinico Differential Revision: D69535475 Pulled By: cipolleschi fbshipit-source-id: f8d68b7957b7d69c13246ce3040a08256f2ebcd6
68 lines
2.6 KiB
Ruby
68 lines
2.6 KiB
Ruby
# Copyright (c) Meta Platforms, Inc. and affiliates.
|
||
#
|
||
# This source code is licensed under the MIT license found in the
|
||
# LICENSE file in the root directory of this source tree.
|
||
|
||
require "json"
|
||
|
||
package = JSON.parse(File.read(File.join(__dir__, "../../..", "package.json")))
|
||
version = package['version']
|
||
|
||
source = { :git => 'https://github.com/facebook/react-native.git' }
|
||
if version == '1000.0.0'
|
||
# This is an unpublished version, use the latest commit hash of the react-native repo, which we’re presumably in.
|
||
source[:commit] = `git rev-parse HEAD`.strip if system("git rev-parse --git-dir > /dev/null 2>&1")
|
||
else
|
||
source[:tag] = "v#{version}"
|
||
end
|
||
|
||
folly_config = get_folly_config()
|
||
folly_compiler_flags = folly_config[:compiler_flags]
|
||
folly_version = folly_config[:version]
|
||
folly_dep_name = folly_config[:dep_name]
|
||
|
||
boost_config = get_boost_config()
|
||
boost_compiler_flags = boost_config[:compiler_flags]
|
||
|
||
Pod::Spec.new do |s|
|
||
s.name = "React-RuntimeCore"
|
||
s.version = version
|
||
s.summary = "The React Native Runtime."
|
||
s.homepage = "https://reactnative.dev/"
|
||
s.license = package["license"]
|
||
s.author = "Meta Platforms, Inc. and its affiliates"
|
||
s.platforms = min_supported_versions
|
||
s.source = source
|
||
s.source_files = "*.{cpp,h}", "nativeviewconfig/*.{cpp,h}"
|
||
s.exclude_files = "iostests/*", "tests/**/*.{cpp,h}"
|
||
s.header_dir = "react/runtime"
|
||
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => "\"$(PODS_ROOT)/boost\" \"$(PODS_ROOT)/Headers/Private/React-Core\" \"${PODS_TARGET_SRCROOT}/../..\"",
|
||
"USE_HEADERMAP" => "YES",
|
||
"CLANG_CXX_LANGUAGE_STANDARD" => rct_cxx_language_standard(),
|
||
"GCC_WARN_PEDANTIC" => "YES" }
|
||
s.compiler_flags = folly_compiler_flags + ' ' + boost_compiler_flags
|
||
|
||
if ENV['USE_FRAMEWORKS']
|
||
s.header_mappings_dir = '../../'
|
||
s.module_name = 'React_RuntimeCore'
|
||
end
|
||
|
||
s.dependency folly_dep_name, folly_version
|
||
s.dependency "React-jsiexecutor"
|
||
s.dependency "React-cxxreact"
|
||
s.dependency "React-runtimeexecutor"
|
||
s.dependency "glog"
|
||
s.dependency "React-jsi"
|
||
s.dependency "React-jserrorhandler"
|
||
s.dependency "React-performancetimeline"
|
||
s.dependency "React-runtimescheduler"
|
||
s.dependency "React-utils"
|
||
s.dependency "React-featureflags"
|
||
|
||
add_dependency(s, "React-Fabric")
|
||
|
||
depend_on_js_engine(s)
|
||
s.dependency "React-jsinspector"
|
||
add_dependency(s, "React-jsitooling", :framework_name => "JSITooling")
|
||
end
|