mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
a70354df12
Summary: In D37873933, we update the buildifier binaries, which apply some minor changes to existing lint. Specifically, entries are now properly sorted. Update the files in xplat such that updating buildifier does not cause lint changes in users diffs. drop-conflicts allow_many_files #nocancel #forcetdhashing (Note: this ignores all push blocking failures!) Reviewed By: d16r Differential Revision: D37873936 fbshipit-source-id: f31d9c50d64ae99f99298977b471bf13e7ed5262
112 lines
3.0 KiB
Python
112 lines
3.0 KiB
Python
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
|
|
load("//tools/build_defs/oss:rn_defs.bzl", "ANDROID", "APPLE", "IOS", "IS_OSS_BUILD", "react_native_root_target", "react_native_target", "rn_android_library", "rn_xplat_cxx_library")
|
|
load("//tools/build_defs/third_party:yarn_defs.bzl", "yarn_workspace")
|
|
load(":DEFS.bzl", "rn_codegen_cli", "rn_codegen_components", "rn_codegen_modules")
|
|
|
|
rn_codegen_cli()
|
|
|
|
SETUP_ENV_DEPS = [] if IS_OSS_BUILD else [
|
|
"//xplat/js:setup_env",
|
|
]
|
|
|
|
fb_native.genrule(
|
|
name = "codegen_tests_schema",
|
|
srcs = glob(
|
|
[
|
|
"**/e2e/__test_fixtures__/components/*NativeComponent.js",
|
|
"**/e2e/__test_fixtures__/modules/Native*.js",
|
|
],
|
|
),
|
|
out = "schema-codegen_tests.json",
|
|
cmd = "$(exe {}) $OUT $SRCS".format(react_native_root_target("packages/react-native-codegen:write_to_json")),
|
|
)
|
|
|
|
rn_codegen_components(
|
|
name = "codegen_tests",
|
|
schema_target = ":codegen_tests_schema",
|
|
)
|
|
|
|
rn_codegen_modules(
|
|
name = "FBReactNativeTestSpec",
|
|
android_package_name = "com.facebook.fbreact.specs",
|
|
ios_assume_nonnull = False,
|
|
schema_target = ":codegen_tests_schema",
|
|
)
|
|
|
|
rn_android_library(
|
|
name = "rn_codegen_library_java",
|
|
srcs = glob(
|
|
["buck_tests/*.java"],
|
|
),
|
|
autoglob = False,
|
|
language = "JAVA",
|
|
visibility = [
|
|
"PUBLIC",
|
|
],
|
|
deps = [
|
|
react_native_target("java/com/facebook/react/bridge:bridge"),
|
|
react_native_target("java/com/facebook/react/common:common"),
|
|
react_native_target("java/com/facebook/react/views/view:view"),
|
|
react_native_target("java/com/facebook/react/uimanager:uimanager"),
|
|
":generated_components_java-codegen_tests",
|
|
],
|
|
)
|
|
|
|
rn_xplat_cxx_library(
|
|
name = "rn_codegen_library",
|
|
srcs = ["buck_tests/emptyFile.cpp"],
|
|
headers = [],
|
|
platforms = (ANDROID, APPLE),
|
|
preprocessor_flags = [
|
|
"-DLOG_TAG=\"ReactNative\"",
|
|
"-DWITH_FBSYSTRACE=1",
|
|
],
|
|
visibility = [
|
|
"PUBLIC",
|
|
],
|
|
deps = [
|
|
":generated_components-codegen_tests",
|
|
],
|
|
)
|
|
|
|
rn_xplat_cxx_library(
|
|
name = "rn_codegen_library_mm",
|
|
srcs = ["buck_tests/emptyFile.mm"],
|
|
headers = [],
|
|
apple_sdks = (IOS,),
|
|
platforms = APPLE,
|
|
preprocessor_flags = [
|
|
"-DLOG_TAG=\"ReactNative\"",
|
|
"-DWITH_FBSYSTRACE=1",
|
|
],
|
|
visibility = [
|
|
"PUBLIC",
|
|
],
|
|
deps = [
|
|
":FBReactNativeTestSpec",
|
|
":generated_components-codegen_tests",
|
|
],
|
|
)
|
|
|
|
yarn_workspace(
|
|
name = "yarn-workspace",
|
|
srcs = glob(
|
|
["src/**/*.js"],
|
|
exclude = [
|
|
"**/__fixtures__/**",
|
|
"**/__flowtests__/**",
|
|
"**/__mocks__/**",
|
|
"**/__server_snapshot_tests__/**",
|
|
"**/__tests__/**",
|
|
"**/node_modules/**",
|
|
"**/node_modules/.bin/**",
|
|
"**/.*",
|
|
"**/.*/**",
|
|
"**/.*/.*",
|
|
"**/*.xcodeproj/**",
|
|
"**/*.xcworkspace/**",
|
|
],
|
|
),
|
|
visibility = ["PUBLIC"],
|
|
)
|