load("@rules_cc//cc:cc_library.bzl", "cc_library")
load("//build_defs:cpp_opts.bzl", "COPTS")

cc_library(
    name = "kotlin",
    srcs = ["generator.cc"],
    hdrs = ["generator.h"],
    copts = COPTS,
    strip_include_prefix = "/src",
    visibility = [
        "//pkg:__pkg__",
        "//src/google/protobuf/compiler:__pkg__",
    ],
    deps = [
        ":kotlin_internal",
        "//src/google/protobuf",
        "//src/google/protobuf:port",
        "//src/google/protobuf/compiler:code_generator",
        "//src/google/protobuf/compiler/java",
        "//src/google/protobuf/compiler/java:helpers",
        "//src/google/protobuf/io:printer",
        "@abseil-cpp//absl/strings",
    ],
)

cc_library(
    name = "kotlin_internal",
    srcs = [
        "field.cc",
        "file.cc",
        "message.cc",
    ],
    hdrs = [
        "field.h",
        "file.h",
        "message.h",
    ],
    copts = COPTS,
    strip_include_prefix = "/src",
    visibility = [
        "//pkg:__pkg__",
        "//src/google/protobuf/compiler:__pkg__",
    ],
    deps = [
        "//src/google/protobuf",
        "//src/google/protobuf:port",
        "//src/google/protobuf:protobuf_lite",
        "//src/google/protobuf/compiler:code_generator",
        "//src/google/protobuf/compiler/java",
        "//src/google/protobuf/compiler/java:context",
        "//src/google/protobuf/compiler/java:field_common",
        "//src/google/protobuf/compiler/java:generator_common",
        "//src/google/protobuf/compiler/java:helpers",
        "//src/google/protobuf/compiler/java:internal_helpers",
        "//src/google/protobuf/compiler/java/full:fg",
        "//src/google/protobuf/compiler/java/full:mfg",
        "//src/google/protobuf/compiler/java/lite:field_generators",
        "//src/google/protobuf/io",
        "//src/google/protobuf/io:printer",
        "@abseil-cpp//absl/container:btree",
        "@abseil-cpp//absl/container:flat_hash_map",
        "@abseil-cpp//absl/log:absl_check",
        "@abseil-cpp//absl/strings",
    ],
)
