Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions packages/react-native/ReactAndroid/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,7 @@ val preparePrefab by
Pair(File(buildDir, "third-party-ndk/folly/").absolutePath, ""),
Pair(File(buildDir, "third-party-ndk/glog/exported/").absolutePath, ""),
Pair("../ReactCommon/callinvoker/", ""),
Pair("../ReactCommon/callinvoker/React/", "React/"),
Pair("../ReactCommon/cxxreact/", "cxxreact/"),
// Exported because the public cxxreact/ErrorUtils.h includes it
Pair("../ReactCommon/jserrorhandler/", "jserrorhandler/"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,6 @@ include(${REACT_COMMON_DIR}/cmake-utils/react-native-flags.cmake)
add_library(callinvoker INTERFACE)

target_include_directories(callinvoker INTERFACE .)
target_link_libraries(callinvoker INTERFACE react_cxxstableapi)
target_compile_reactnative_options(callinvoker INTERFACE)
target_compile_options(callinvoker INTERFACE -Wpedantic)
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ else
source[:tag] = "v#{version}"
end

header_search_paths = []

if ENV['USE_FRAMEWORKS']
header_search_paths << "\"$(PODS_TARGET_SRCROOT)/..\"" # ReactCommon, for <react/cxxstableapi/...>
end

Pod::Spec.new do |s|
s.name = "React-callinvoker"
s.version = version
Expand All @@ -26,7 +32,17 @@ Pod::Spec.new do |s|
s.platforms = min_supported_versions
s.source = source
s.source_files = podspec_sources("**/*.{cpp,h}", "**/*.h")
s.exclude_files = "React"
s.pod_target_xcconfig = { "HEADER_SEARCH_PATHS" => header_search_paths.join(' ') }
s.header_dir = "ReactCommon"

s.subspec "CallInvokerUmbrella" do |ss|
ss.source_files = "React/*.h"
ss.header_dir = "React"
ss.header_mappings_dir = "React"
end

s.dependency "React-cxxstableapi"

mark_as_react_native_build(s)
end
27 changes: 27 additions & 0 deletions packages/react-native/ReactCommon/callinvoker/React/CallInvoker.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* 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.
*/

#pragma once

// =============================================================================
// Umbrella header for the `callinvoker` module - public entry point.
//
// #include <React/CallInvoker.h>
//
// Re-exports the module's public interface headers. React Native's own code
// should keep using the fine-grained `<ReactCommon/...>` includes; only outside
// consumers use this umbrella.
// =============================================================================

// Marks that the following headers are pulled in through the umbrella, so their
// shared guard (<react/cxxstableapi/UmbrellaGuard.h>) accepts them.
#define RN_UMBRELLA_CONTEXT

#include <ReactCommon/CallInvoker.h>
#include <ReactCommon/SchedulerPriority.h>

#undef RN_UMBRELLA_CONTEXT
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

#include "SchedulerPriority.h"

#include <functional>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@

#pragma once

#include <react/cxxstableapi/UmbrellaGuard.h>

namespace facebook::react {

enum class SchedulerPriority : int {
Expand Down
13 changes: 13 additions & 0 deletions packages/react-native/scripts/ios-prebuild/headers-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,19 @@ const PodspecExceptions /*: {[key: string]: PodSpecConfiguration} */ = {
},
],
},
'ReactCommon/callinvoker/React-callinvoker.podspec': {
name: 'React-callinvoker',
headerPatterns: ['**/*.h'],
excludePatterns: ['React/**'],
headerDir: 'ReactCommon',
subSpecs: [
{
name: 'CallInvokerUmbrella',
headerPatterns: ['React/*.h'],
headerDir: 'React',
},
],
},
'React-Core.podspec': {
name: 'React-Core',
headerPatterns: [],
Expand Down
Loading