load("@rules_proto//proto:defs.bzl", "proto_library")
load("@io_bazel_rules_go//go:def.bzl", "go_library")
load("@io_bazel_rules_go//proto:def.bzl", "go_proto_library")

proto_library(
    name = "config_proto",
    srcs = ["config.proto"],
    visibility = ["//visibility:public"],
    deps = ["//pb/custom_evaluator:custom_evaluator_proto"],
)

go_proto_library(
    name = "config_go_proto",
    importpath = "github.com/GoogleCloudPlatform/testgrid/pb/config",
    proto = ":config_proto",
    visibility = ["//visibility:public"],
    deps = ["//pb/custom_evaluator:go_default_library"],
)

go_library(
    name = "go_default_library",
    embed = [":config_go_proto"],
    importpath = "github.com/GoogleCloudPlatform/testgrid/pb/config",
    visibility = ["//visibility:public"],
)

filegroup(
    name = "package-srcs",
    srcs = glob(["**"]),
    tags = ["automanaged"],
    visibility = ["//visibility:private"],
)

filegroup(
    name = "all-srcs",
    srcs = [":package-srcs"],
    tags = ["automanaged"],
    visibility = ["//visibility:public"],
)
