diff --git a/BUCK b/BUCK index 2516e0e1f5..7f0de5d009 100644 --- a/BUCK +++ b/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, - ], -) diff --git a/packages/rn-tester/BUCK b/packages/rn-tester/BUCK index 589c38c187..d6f37cd11b 100644 --- a/packages/rn-tester/BUCK +++ b/packages/rn-tester/BUCK @@ -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, + ], +)