1load( 2 "//tools/build_defs/oss:rn_defs.bzl", 3 "ANDROID", 4 "APPLE", 5 "CXX", 6 "YOGA_CXX_TARGET", 7 "fb_xplat_cxx_test", 8 "get_apple_compiler_flags", 9 "get_apple_inspector_flags", 10 "get_preprocessor_flags_for_build_mode", 11 "react_native_target", 12 "react_native_xplat_target", 13 "rn_xplat_cxx_library", 14 "subdir_glob", 15) 16 17APPLE_COMPILER_FLAGS = get_apple_compiler_flags() 18 19rn_xplat_cxx_library( 20 name = "androidprogressbar", 21 srcs = glob( 22 ["**/*.cpp"], 23 exclude = glob([ 24 "tests/**/*.cpp", 25 ]), 26 ), 27 headers = [], 28 header_namespace = "", 29 exported_headers = subdir_glob( 30 [ 31 ("", "*.h"), 32 ], 33 prefix = "react/renderer/components/progressbar", 34 ), 35 compiler_flags_pedantic = True, 36 cxx_tests = [":tests"], 37 fbandroid_deps = [ 38 "//xplat/folly:dynamic", 39 react_native_target("jni/react/jni:jni"), 40 ], 41 fbandroid_exported_headers = subdir_glob( 42 [ 43 ("", "*.h"), 44 ("android/react/renderer/components/progressbar", "*.h"), 45 ], 46 prefix = "react/renderer/components/progressbar", 47 ), 48 fbandroid_headers = glob( 49 ["android/react/renderer/components/progressbar/*.h"], 50 ), 51 fbandroid_srcs = glob( 52 ["android/react/renderer/components/progressbar/*.cpp"], 53 ), 54 fbobjc_compiler_flags = APPLE_COMPILER_FLAGS, 55 fbobjc_preprocessor_flags = get_preprocessor_flags_for_build_mode() + get_apple_inspector_flags(), 56 force_static = True, 57 ios_exported_headers = subdir_glob( 58 [ 59 ("", "*.h"), 60 ("platform/ios", "*.h"), 61 ], 62 prefix = "react/renderer/components/progressbar", 63 ), 64 ios_headers = glob( 65 ["platform/ios/*.h"], 66 ), 67 ios_srcs = glob( 68 ["platform/ios/*.cpp"], 69 ), 70 labels = [ 71 "pfh:ReactNative_CommonInfrastructurePlaceholder", 72 ], 73 platforms = (ANDROID, APPLE, CXX), 74 preprocessor_flags = [ 75 "-DLOG_TAG=\"ReactNative\"", 76 "-DWITH_FBSYSTRACE=1", 77 ], 78 visibility = ["PUBLIC"], 79 deps = [ 80 "//third-party/glog:glog", 81 "//xplat/fbsystrace:fbsystrace", 82 YOGA_CXX_TARGET, 83 react_native_xplat_target("react/debug:debug"), 84 react_native_xplat_target("react/renderer/debug:debug"), 85 react_native_xplat_target("react/renderer/core:core"), 86 react_native_xplat_target("react/renderer/components/image:image"), 87 react_native_xplat_target("react/renderer/components/view:view"), 88 react_native_xplat_target("react/renderer/graphics:graphics"), 89 react_native_xplat_target("react/renderer/imagemanager:imagemanager"), 90 react_native_xplat_target("react/renderer/uimanager:uimanager"), 91 react_native_xplat_target("react/renderer/componentregistry:componentregistry"), 92 "//xplat/js/react-native-github:generated_components-rncore", 93 ], 94) 95 96fb_xplat_cxx_test( 97 name = "tests", 98 srcs = glob(["tests/**/*.cpp"]), 99 headers = glob(["tests/**/*.h"]), 100 compiler_flags = [ 101 "-fexceptions", 102 "-frtti", 103 "-std=c++17", 104 "-Wall", 105 ], 106 contacts = ["[email protected]"], 107 platforms = ( 108 # `Apple` and `Android` flavors are disabled because the module (built with those flavors) requires Emulator/Simulator (which is expensive and slow). At the same time, we don't really have tests here. 109 # ANDROID, 110 # APPLE, 111 CXX, 112 ), 113 deps = [ 114 "//xplat/third-party/gmock:gtest", 115 ], 116) 117