Move RCTTestApple into packages/rn-tester

Summary: Changelog: [Internal]

Reviewed By: fkgozali

Differential Revision: D30056021

fbshipit-source-id: 9012ca6934f95946ff157ca472aa6a6e84d7d7e9
This commit is contained in:
Moti Zilberman 2021-08-04 13:01:49 -07:00 коммит произвёл Facebook GitHub Bot
Родитель 30d37cfd39
Коммит 260c5a393f
2 изменённых файлов: 50 добавлений и 42 удалений

39
BUCK
Просмотреть файл

@ -17,7 +17,6 @@ load(
"RCT_IMAGE_DATA_DECODER_SOCKET",
"RCT_IMAGE_URL_LOADER_SOCKET",
"RCT_URL_REQUEST_HANDLER_SOCKET",
"YOGA_APPLE_TARGET",
"YOGA_CXX_TARGET",
"react_fabric_component_plugin_provider",
"react_module_plugin_providers",
@ -1386,41 +1385,3 @@ rn_xplat_cxx_library2(
"//fbobjc/VendorLib/react-native-maps:react-native-maps",
],
)
rn_apple_library(
name = "RCTTestApple",
srcs = glob([
"packages/rn-tester/RCTTest/**/*.m",
"packages/rn-tester/RCTTest/**/*.mm",
]),
headers = glob([
"packages/rn-tester/RCTTest/**/*.h",
]),
exported_headers = {
"RCTTest/RCTTestRunner.h": "packages/rn-tester/RCTTest/RCTTestRunner.h",
},
autoglob = False,
frameworks = [
"XCTest",
],
header_path_prefix = "React",
labels = [
"disable_plugins_only_validation",
],
plugins = react_module_plugin_providers(
name = "TestModule",
native_class_func = "RCTTestModuleCls",
),
plugins_header = "FBRCTTestPlugins.h",
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode() + rn_extra_build_flags() + [
"-DRN_DISABLE_OSS_PLUGIN_HEADER",
],
visibility = ["PUBLIC"],
deps = [
"//xplat/js/react-native-github:RCTLinkingApple",
"//xplat/js/react-native-github:RCTPushNotificationApple",
"//xplat/js/react-native-github:ReactInternalApple",
"//xplat/js/react-native-github/React/CoreModules:CoreModulesApple",
YOGA_APPLE_TARGET,
],
)

Просмотреть файл

@ -7,7 +7,16 @@ load("//tools/build_defs/apple:fb_apple_test.bzl", "fb_apple_test")
load("//tools/build_defs/apple:fb_js_dep.bzl", "rn_js_bundle_dep")
load("//tools/build_defs/apple:flag_defs.bzl", "get_objc_arc_preprocessor_flags", "get_preprocessor_flags_for_build_mode")
load("//tools/build_defs/oss:metro_defs.bzl", "rn_library")
load("//tools/build_defs/oss:rn_defs.bzl", "APPLE", "make_resource_glob", "rn_xplat_cxx_library2")
load(
"//tools/build_defs/oss:rn_defs.bzl",
"APPLE",
"YOGA_APPLE_TARGET",
"make_resource_glob",
"react_module_plugin_providers",
"rn_apple_library",
"rn_extra_build_flags",
"rn_xplat_cxx_library2",
)
load("//tools/build_defs/third_party:yarn_defs.bzl", "yarn_workspace")
yarn_workspace(
@ -116,7 +125,7 @@ fb_apple_test(
],
deps = REACT_CORE_OSS_DEPS + [
"//xplat/js/react-native-github:RCTCxxBridgeApple",
"//xplat/js/react-native-github:RCTTestApple",
":RCTTestApple",
":RNTesterUnitTestsResourcesApple",
"//fbobjc/VendorLib/OCMock:OCMock",
],
@ -149,7 +158,7 @@ fb_apple_test(
"//fbobjc/Libraries/FBReactKit:workspace",
],
deps = REACT_CORE_OSS_DEPS + [
"//xplat/js/react-native-github:RCTTestApple",
":RCTTestApple",
":RNTesterIntegrationTestsResourcesApple",
":RNTesterResourcesApple",
"//xplat/js/react-native-github:RCTCxxBridgeApple",
@ -222,3 +231,41 @@ fb_xplat_resource(
"//fbobjc/Libraries/FBReactKit:",
],
)
rn_apple_library(
name = "RCTTestApple",
srcs = glob([
"RCTTest/**/*.m",
"RCTTest/**/*.mm",
]),
headers = glob([
"RCTTest/**/*.h",
]),
exported_headers = {
"RCTTest/RCTTestRunner.h": "RCTTest/RCTTestRunner.h",
},
autoglob = False,
frameworks = [
"XCTest",
],
header_path_prefix = "React",
labels = [
"disable_plugins_only_validation",
],
plugins = react_module_plugin_providers(
name = "TestModule",
native_class_func = "RCTTestModuleCls",
),
plugins_header = "FBRCTTestPlugins.h",
preprocessor_flags = get_objc_arc_preprocessor_flags() + get_preprocessor_flags_for_build_mode() + rn_extra_build_flags() + [
"-DRN_DISABLE_OSS_PLUGIN_HEADER",
],
visibility = ["PUBLIC"],
deps = [
"//xplat/js/react-native-github:RCTLinkingApple",
"//xplat/js/react-native-github:RCTPushNotificationApple",
"//xplat/js/react-native-github:ReactInternalApple",
"//xplat/js/react-native-github/React/CoreModules:CoreModulesApple",
YOGA_APPLE_TARGET,
],
)