2020-04-09 22:24:14 +03:00
|
|
|
load("@fbsource//tools/build_defs/apple:flag_defs.bzl", "OBJC_ARC_PREPROCESSOR_FLAGS", "get_preprocessor_flags_for_build_mode")
|
2019-09-12 23:07:35 +03:00
|
|
|
load("@fbsource//tools/build_defs/oss:rn_defs.bzl", "rn_apple_library", "rn_extra_build_flags")
|
2019-07-02 20:19:41 +03:00
|
|
|
load(
|
|
|
|
"@fbsource//xplat/configurations/buck/apple/plugins/sad_xplat_hosted_configurations:react_module_registration.bzl",
|
|
|
|
"react_module_plugin_providers",
|
|
|
|
)
|
2019-07-02 01:12:56 +03:00
|
|
|
|
|
|
|
rn_apple_library(
|
|
|
|
name = "CoreModulesApple",
|
|
|
|
srcs = glob(
|
|
|
|
[
|
|
|
|
"**/*.m",
|
|
|
|
"**/*.mm",
|
|
|
|
],
|
|
|
|
),
|
2019-07-04 21:17:06 +03:00
|
|
|
exported_headers = glob(["**/*.h"]),
|
2019-07-02 20:19:41 +03:00
|
|
|
compiler_flags = [
|
|
|
|
"-Wno-error=unguarded-availability-new",
|
|
|
|
"-Wno-unknown-warning-option",
|
2020-05-15 18:50:11 +03:00
|
|
|
"-Wno-unused-property-ivar",
|
2019-07-02 20:19:41 +03:00
|
|
|
],
|
|
|
|
contacts = ["oncall+react_native@xmail.facebook.com"],
|
2020-04-09 22:24:14 +03:00
|
|
|
enable_exceptions = True,
|
2019-07-02 20:19:41 +03:00
|
|
|
exported_linker_flags = [
|
|
|
|
"-weak_framework",
|
|
|
|
"UserNotifications",
|
|
|
|
"-weak_framework",
|
|
|
|
"WebKit",
|
|
|
|
],
|
2019-09-12 23:07:35 +03:00
|
|
|
exported_preprocessor_flags = rn_extra_build_flags(),
|
2020-01-15 02:22:35 +03:00
|
|
|
extension_api_only = True,
|
2019-07-02 20:19:41 +03:00
|
|
|
frameworks = [
|
|
|
|
"Foundation",
|
|
|
|
"UIKit",
|
|
|
|
],
|
2019-07-04 21:17:06 +03:00
|
|
|
header_path_prefix = "React",
|
2020-04-10 11:20:22 +03:00
|
|
|
labels = [
|
|
|
|
"depslint_never_remove", # Some old NativeModule still relies on +load unfortunately.
|
2020-05-16 07:51:56 +03:00
|
|
|
"supermodule:xplat/default/public.react_native.infra",
|
2020-04-10 11:20:22 +03:00
|
|
|
],
|
2019-07-02 20:19:41 +03:00
|
|
|
link_whole = True,
|
|
|
|
platform_preprocessor_flags = [(
|
|
|
|
"linux",
|
|
|
|
["-D PIC_MODIFIER=@PLT"],
|
|
|
|
)],
|
2019-09-24 01:04:30 +03:00
|
|
|
plugins =
|
|
|
|
react_module_plugin_providers(
|
|
|
|
name = "AccessibilityManager",
|
|
|
|
native_class_func = "RCTAccessibilityManagerCls",
|
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "Appearance",
|
|
|
|
native_class_func = "RCTAppearanceCls",
|
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "DeviceInfo",
|
|
|
|
native_class_func = "RCTDeviceInfoCls",
|
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "ExceptionsManager",
|
|
|
|
native_class_func = "RCTExceptionsManagerCls",
|
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "PlatformConstants",
|
|
|
|
native_class_func = "RCTPlatformCls",
|
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "Clipboard",
|
|
|
|
native_class_func = "RCTClipboardCls",
|
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "I18nManager",
|
|
|
|
native_class_func = "RCTI18nManagerCls",
|
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "SourceCode",
|
|
|
|
native_class_func = "RCTSourceCodeCls",
|
2019-10-01 00:28:18 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "ActionSheetManager",
|
|
|
|
native_class_func = "RCTActionSheetManagerCls",
|
2019-10-15 19:12:56 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "AlertManager",
|
|
|
|
native_class_func = "RCTAlertManagerCls",
|
2019-10-15 19:12:56 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "AsyncLocalStorage",
|
|
|
|
native_class_func = "RCTAsyncLocalStorageCls",
|
2019-10-17 04:43:00 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "Timing",
|
|
|
|
native_class_func = "RCTTimingCls",
|
2019-11-01 21:54:44 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "StatusBarManager",
|
|
|
|
native_class_func = "RCTStatusBarManagerCls",
|
2019-11-01 21:54:44 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "KeyboardObserver",
|
|
|
|
native_class_func = "RCTKeyboardObserverCls",
|
2019-11-01 21:54:44 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "AppState",
|
|
|
|
native_class_func = "RCTAppStateCls",
|
2019-11-01 21:54:44 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "PerfMonitor",
|
|
|
|
native_class_func = "RCTPerfMonitorCls",
|
2019-11-05 02:58:49 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "DevMenu",
|
|
|
|
native_class_func = "RCTDevMenuCls",
|
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "DevSettings",
|
|
|
|
native_class_func = "RCTDevSettingsCls",
|
2019-11-05 02:58:49 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "RedBox",
|
|
|
|
native_class_func = "RCTRedBoxCls",
|
2019-11-05 02:58:49 +03:00
|
|
|
) + react_module_plugin_providers(
|
2019-12-10 13:28:06 +03:00
|
|
|
name = "LogBox",
|
|
|
|
native_class_func = "RCTLogBoxCls",
|
|
|
|
) + react_module_plugin_providers(
|
2019-11-05 02:58:49 +03:00
|
|
|
name = "TVNavigationEventEmitter",
|
|
|
|
native_class_func = "RCTTVNavigationEventEmitterCls",
|
2019-11-09 01:08:11 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "WebSocketExecutor",
|
|
|
|
native_class_func = "RCTWebSocketExecutorCls",
|
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "WebSocketModule",
|
|
|
|
native_class_func = "RCTWebSocketModuleCls",
|
2020-02-28 04:01:18 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "DevLoadingView",
|
|
|
|
native_class_func = "RCTDevLoadingViewCls",
|
2020-06-08 19:04:56 +03:00
|
|
|
) + react_module_plugin_providers(
|
|
|
|
name = "DevSplitBundleLoader",
|
|
|
|
native_class_func = "RCTDevSplitBundleLoaderCls",
|
2019-09-24 01:04:30 +03:00
|
|
|
),
|
2019-10-08 00:53:29 +03:00
|
|
|
plugins_header = "FBCoreModulesPlugins.h",
|
2020-03-10 04:24:54 +03:00
|
|
|
preprocessor_flags = OBJC_ARC_PREPROCESSOR_FLAGS + get_preprocessor_flags_for_build_mode() + rn_extra_build_flags() + [
|
2019-07-02 20:19:41 +03:00
|
|
|
"-DRN_DISABLE_OSS_PLUGIN_HEADER",
|
|
|
|
],
|
2019-08-13 21:09:56 +03:00
|
|
|
reexport_all_header_dependencies = True,
|
2019-07-02 20:19:41 +03:00
|
|
|
visibility = ["PUBLIC"],
|
|
|
|
exported_deps = [
|
2020-03-26 07:51:33 +03:00
|
|
|
"//xplat/js:RCTLinkingApple",
|
|
|
|
"//xplat/js:RCTPushNotificationApple",
|
|
|
|
"//xplat/js/react-native-github:ReactInternalApple",
|
|
|
|
"//xplat/js/react-native-github/Libraries/FBReactNativeSpec:FBReactNativeSpecApple",
|
2019-07-02 01:12:56 +03:00
|
|
|
],
|
|
|
|
)
|