2021-06-21 22:28:17 +00:00
|
|
|
load("@rules_java//java:defs.bzl", "java_proto_library")
|
|
|
|
load("@rules_jvm_external//:defs.bzl", "java_export")
|
2021-04-20 18:36:32 +00:00
|
|
|
load("@rules_proto//proto:defs.bzl", "proto_library")
|
2021-06-21 23:03:51 +00:00
|
|
|
load("//:protobuf_version.bzl", "PROTOBUF_VERSION")
|
2021-04-20 18:36:32 +00:00
|
|
|
load("//java/internal:testing.bzl", "junit_tests")
|
2020-02-13 21:04:14 +00:00
|
|
|
|
2021-06-21 22:28:17 +00:00
|
|
|
java_export(
|
2020-02-13 21:04:14 +00:00
|
|
|
name = "util",
|
2021-06-21 22:28:17 +00:00
|
|
|
maven_coordinates = "com.google.protobuf:protobuf-java-util:%s" % VERSION,
|
|
|
|
pom_template = "pom_template.xml",
|
2020-02-13 21:04:14 +00:00
|
|
|
srcs = glob([
|
|
|
|
"src/main/java/com/google/protobuf/util/*.java",
|
|
|
|
]),
|
|
|
|
visibility = ["//visibility:public"],
|
|
|
|
deps = [
|
|
|
|
"//external:error_prone_annotations",
|
|
|
|
"//external:gson",
|
|
|
|
"//external:guava",
|
|
|
|
"//java/core",
|
|
|
|
],
|
|
|
|
)
|
2021-04-20 18:36:32 +00:00
|
|
|
|
|
|
|
proto_library(
|
|
|
|
name = "test_protos",
|
|
|
|
srcs = glob(["src/test/proto/**/*.proto"]),
|
|
|
|
deps = [
|
|
|
|
"//:any_proto",
|
|
|
|
"//:duration_proto",
|
|
|
|
"//:field_mask_proto",
|
|
|
|
"//:struct_proto",
|
|
|
|
"//:timestamp_proto",
|
|
|
|
"//:wrappers_proto",
|
|
|
|
],
|
|
|
|
)
|
|
|
|
|
|
|
|
java_proto_library(
|
|
|
|
name = "test_protos_java_proto",
|
|
|
|
deps = [":test_protos"],
|
|
|
|
)
|
|
|
|
|
|
|
|
junit_tests(
|
|
|
|
name = "tests",
|
|
|
|
srcs = glob(["src/test/java/**/*.java"]),
|
|
|
|
package_name = "com.google.protobuf.util",
|
|
|
|
deps = [
|
|
|
|
":test_protos_java_proto",
|
|
|
|
":util",
|
|
|
|
"//external:guava",
|
|
|
|
"//external:junit",
|
|
|
|
"//external:truth",
|
|
|
|
"//java/core",
|
|
|
|
"//java/core:generic_test_protos_java_proto",
|
|
|
|
],
|
|
|
|
)
|