java_library(
    name = "earlybird_root-lib",
    sources = ["*.java"],
    platform = "java8",
    tags = ["bazel-compatible"],
    dependencies = [
        "3rdparty/jvm/com/google/inject:guice",
        "3rdparty/jvm/commons-lang",
        "3rdparty/jvm/org/slf4j:slf4j-api",
        "decider/src/main/scala",
        "finagle-internal/mtls/src/main/scala/com/twitter/finagle/mtls/authentication",
        "finagle-internal/mtls/src/main/scala/com/twitter/finagle/mtls/authorization/server",
        "finagle/finagle-memcached/src/main/java",
        "finagle/finagle-mux/src/main/scala",
        "finagle/finagle-thrift/src/main/java",
        "finagle/finagle-thrift/src/main/scala",
        "finatra/inject/inject-core/src/main/scala",
        "finatra/inject/inject-server/src/main/scala/com/twitter/inject/server",
        "src/java/com/google/common/util/concurrent",
        "src/java/com/twitter/common/collections",
        "src/java/com/twitter/common_internal/text/version",
        "src/java/com/twitter/search/common/caching",
        "src/java/com/twitter/search/common/clientstats",
        "src/java/com/twitter/search/common/config",
        "src/java/com/twitter/search/common/dark",
        "src/java/com/twitter/search/common/decider",
        "src/java/com/twitter/search/common/metrics",
        "src/java/com/twitter/search/common/partitioning/base",
        "src/java/com/twitter/search/common/partitioning/zookeeper",
        "src/java/com/twitter/search/common/relevance:ranking",
        "src/java/com/twitter/search/common/root",
        "src/java/com/twitter/search/common/runtime",
        "src/java/com/twitter/search/common/schema/earlybird",
        "src/java/com/twitter/search/common/search",
        "src/java/com/twitter/search/common/util/earlybird",
        "src/java/com/twitter/search/common/util/io/periodic",
        "src/java/com/twitter/search/common/util/zookeeper",
        "src/java/com/twitter/search/earlybird/common",
        "src/java/com/twitter/search/earlybird/config",
        "src/java/com/twitter/search/earlybird_root/caching",
        "src/java/com/twitter/search/earlybird_root/common",
        "src/java/com/twitter/search/earlybird_root/filters",
        "src/java/com/twitter/search/earlybird_root/mergers",
        "src/java/com/twitter/search/earlybird_root/quota",
        "src/java/com/twitter/search/earlybird_root/routers",
        "src/java/com/twitter/search/earlybird_root/visitors",
        "src/java/com/twitter/search/queryparser",
        "src/java/com/twitter/search/queryparser/query:core-query-nodes",
        "src/java/com/twitter/search/queryparser/query/search:search-query-nodes",
        "src/thrift/com/twitter/search:benchmark_query-java",
        "src/thrift/com/twitter/search:earlybird-java",
        "stitch/stitch-core",
        "strato/src/main/scala/com/twitter/strato/catalog",
        "strato/src/main/scala/com/twitter/strato/client",
        "thrift-web-forms",
        "thrift-web-forms/src/main/scala/com/twitter/thriftwebforms/model",
    ],
)

jvm_binary(
    name = "earlybird_root-binary",
    basename = "earlybird_root",
    # The main class is reset in the aurora files (it's a required param).
    # We need to set it to something here, because hadoop_binary requires it.
    main = "com.twitter.search.earlybird_root.RealtimeRootAppMain",
    runtime_platform = "java11",
    tags = ["bazel-compatible"],
    dependencies = [
        "3rdparty/jvm/org/slf4j:slf4j-log4j12",
        ":earlybird_root-lib",
        "src/java/com/twitter/search/common/logging:search-log4j",
        # For /admin/logging.
        "twitter-server/slf4j-log4j12/src/main/scala",
    ],
)
