load("//ReactNative:DEFS.bzl", "rn_java_annotation_processor", "rn_java_library", "react_native_dep", "react_native_target")

rn_java_annotation_processor(
    name = "processing",
    does_not_affect_abi = True,
    processor_class = "com.facebook.react.module.processing.ReactModuleSpecProcessor",
    visibility = [
        "PUBLIC",
    ],
    deps = [
        ":processing-lib",
    ],
)

rn_java_library(
    name = "processing-lib",
    srcs = glob(["*.java"]),
    source = "8",
    target = "8",
    deps = [
        react_native_dep("third-party/java/infer-annotations:infer-annotations"),
        react_native_dep("third-party/java/javapoet:javapoet"),
        react_native_dep("third-party/java/jsr-305:jsr-305"),
        react_native_target("java/com/facebook/react/module/annotations:annotations"),
        react_native_target("java/com/facebook/react/bridge:bridge"),
        react_native_target("java/com/facebook/react/module/model:model"),
    ],
)
