Files
react-native/Libraries/BUCK
T
Ramanpreet Nara 4bf03e1f23 Stop force including OSS specs in TMMDelegate codegen
Summary: Changelog: [Internal]

Reviewed By: JoshuaGross

Differential Revision: D25844710

fbshipit-source-id: b80c29335fbac6941918c07f24027971359d0df2
2021-01-08 14:44:00 -08:00

49 lines
1.5 KiB
Python

# Copyright (c) Facebook, Inc. and its affiliates.
#
# This source code is licensed under the MIT license found in the
# LICENSE file in the root directory of this source tree.
load("//tools/build_defs:fb_native_wrapper.bzl", "fb_native")
load(
"//tools/build_defs/oss:rn_codegen_defs.bzl",
"rn_codegen_components",
"rn_codegen_modules",
)
load(
"//tools/build_defs/oss:rn_defs.bzl",
"react_native_root_target",
)
fb_native.genrule(
# The schema name must have the following format: "codegen_rn_modules_schema_{native_module_spec_name}"
name = "codegen_rn_modules_schema_FBReactNativeSpec",
srcs = glob(
[
"**/*.js",
],
exclude = [
"**/__tests__/**/*",
],
),
cmd = "$(exe {}) $OUT $SRCS".format(react_native_root_target("packages/react-native-codegen:write_to_json")),
out = "schema.json",
labels = [
"codegen_rule",
"react_native_schema_target",
],
)
rn_codegen_modules(
name = "FBReactNativeSpec",
android_package_name = "com.facebook.fbreact.specs",
library_labels = ["supermodule:xplat/default/public.react_native.infra"],
native_module_spec_name = "FBReactNativeSpec",
schema_target = ":codegen_rn_modules_schema_FBReactNativeSpec",
)
rn_codegen_components(
name = "FBReactNativeComponentSpec",
library_labels = ["supermodule:xplat/default/public.react_native.infra"],
schema_target = ":codegen_rn_modules_schema_FBReactNativeSpec",
)